This commit is contained in:
vfedosevich 2015-05-15 06:21:23 -07:00
commit ab1d7fef54
64 changed files with 3129 additions and 523 deletions

View file

@ -331,11 +331,14 @@
<Publish Dialog="PrereqCheckDlg" Control="Cancel" Event="SpawnDialog" Value="CancelDlg">1</Publish>
<!--CustomizeDlg-->
<Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="PrereqCheckDlg" Order="3">1</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="SWebDlg" Order="12">&amp;ServerFeature=3</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ESWebDlg" Order="11">&amp;EnterpriseServerFeature=3</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="PWebDlg" Order="10">&amp;PortalFeature=3</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="DatabaseConnectionDlg" Order="9">&amp;SchedulerServiceFeature=3</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="CustomVerifyReadyDlg" Order="8">&amp;WDPortalFeature=3</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ServerPasswordDlg" Order="15"><![CDATA[&ServerFeature=-1 AND !ServerFeature=3]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ServerAdminPasswordDlg" Order="14"><![CDATA[&EnterpriseServerFeature=-1 AND !EnterpriseServerFeature=3]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ESUrlDlg" Order="13"><![CDATA[&PortalFeature=-1 AND !PortalFeature=3]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="SWebDlg" Order="12"><![CDATA[&ServerFeature=3 AND COMPFOUND_SERVER=0]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ESWebDlg" Order="11"><![CDATA[&EnterpriseServerFeature=3 AND COMPFOUND_ESERVER=0]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="PWebDlg" Order="10"><![CDATA[&PortalFeature=3 AND COMPFOUND_PORTAL=0]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="DatabaseConnectionDlg" Order="9"><![CDATA[&SchedulerServiceFeature=3 AND COMPFOUND_SCHEDULER=0]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="CustomVerifyReadyDlg" Order="8"><![CDATA[&WDPortalFeature=3 AND COMPFOUND_WDPORTAL=0]]></Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="CustomVerifyReadyDlg" Order="7">1</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="DoAction" Value="CA_RecapListUI" Order="1">1</Publish>
<!--SWebDlg-->
@ -357,7 +360,10 @@
<Publish Dialog="SUserAccountDlg" Control="SelectUserButton" Property="PI_SERVER_LOGIN" Value="[DSOP_UPN]" Order="3"><![CDATA[DSOP_UPN <> ""]]></Publish>
<Publish Dialog="SUserAccountDlg" Control="SelectUserButton" Property="PI_SERVER_LOGIN" Value="[DSOP_NAME]" Order="3"><![CDATA[DSOP_NAME <> "" AND DSOP_UPN = ""]]></Publish>
<!--ServerPasswordDlg-->
<Publish Dialog="ServerPasswordDlg" Control="Back" Event="NewDialog" Value="SUserAccountDlg">1</Publish>
<Publish Dialog="ServerPasswordDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="2"><![CDATA[&ServerFeature=-1 AND !ServerFeature=3]]></Publish>
<Publish Dialog="ServerPasswordDlg" Control="Back" Event="NewDialog" Value="SUserAccountDlg" Order="1">1</Publish>
<Publish Dialog="ServerPasswordDlg" Control="Next" Event="NewDialog" Value="ServerAdminPasswordDlg" Order="9"><![CDATA[&EnterpriseServerFeature=-1 AND !EnterpriseServerFeature=3 AND VALIDATE_OK = 1]]></Publish>
<Publish Dialog="ServerPasswordDlg" Control="Next" Event="NewDialog" Value="ESUrlDlg" Order="8"><![CDATA[&PortalFeature=-1 AND !PortalFeature=3 AND VALIDATE_OK = "1"]]></Publish>
<Publish Dialog="ServerPasswordDlg" Control="Next" Event="NewDialog" Value="ESWebDlg" Order="7">&amp;EnterpriseServerFeature=3 AND VALIDATE_OK = "1"</Publish>
<Publish Dialog="ServerPasswordDlg" Control="Next" Event="NewDialog" Value="PWebDlg" Order="6">&amp;PortalFeature=3 AND VALIDATE_OK = "1"</Publish>
<Publish Dialog="ServerPasswordDlg" Control="Next" Event="NewDialog" Value="DatabaseConnectionDlg" Order="5">&amp;SchedulerServiceFeature=3 AND VALIDATE_OK = "1"</Publish>
@ -389,7 +395,11 @@
<Publish Dialog="ESUserAccountDlg" Control="SelectUserButton" Property="PI_ESERVER_LOGIN" Value="[DSOP_UPN]" Order="3"><![CDATA[DSOP_UPN <> ""]]></Publish>
<Publish Dialog="ESUserAccountDlg" Control="SelectUserButton" Property="PI_ESERVER_LOGIN" Value="[DSOP_NAME]" Order="3"><![CDATA[DSOP_NAME <> "" AND DSOP_UPN = ""]]></Publish>
<!--ServerAdminPasswordDlg-->
<Publish Dialog="ServerAdminPasswordDlg" Control="Back" Event="NewDialog" Value="ESUserAccountDlg">1</Publish>
<Publish Dialog="ServerAdminPasswordDlg" Control="Back" Event="NewDialog" Value="ServerPasswordDlg" Order="3"><![CDATA[&ServerFeature=-1 AND !ServerFeature=3]]></Publish>
<Publish Dialog="ServerAdminPasswordDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="2"><![CDATA[&EnterpriseServerFeature=-1 AND !EnterpriseServerFeature=3]]></Publish>
<Publish Dialog="ServerAdminPasswordDlg" Control="Back" Event="NewDialog" Value="ESUserAccountDlg" Order="1">1</Publish>
<Publish Dialog="ServerAdminPasswordDlg" Control="Next" Event="NewDialog" Value="ESUrlDlg" Order="5"><![CDATA[&PortalFeature=-1 AND !PortalFeature=3 AND VALIDATE_OK = "1"]]></Publish>
<Publish Dialog="ServerAdminPasswordDlg" Control="Next" Event="NewDialog" Value="CustomVerifyReadyDlg" Order="4"><![CDATA[&EnterpriseServerFeature=-1 AND !EnterpriseServerFeature=3 AND VALIDATE_OK = "1"]]></Publish>
<Publish Dialog="ServerAdminPasswordDlg" Control="Next" Event="NewDialog" Value="DatabaseConnectionDlg" Order="3"><![CDATA[(&EnterpriseServerFeature=3 OR &SchedulerServiceFeature=3) AND VALIDATE_OK="1"]]></Publish>
<Publish Dialog="ServerAdminPasswordDlg" Control="Next" Event="SpawnDialog" Value="ValidateDlg" Order="2">VALIDATE_OK="0"</Publish>
<Publish Dialog="ServerAdminPasswordDlg" Control="Next" Event="DoAction" Value="CA_ServerAdminValidateUI" Order="1">1</Publish>
@ -437,21 +447,28 @@
<Publish Dialog="PUserAccountDlg" Control="SelectUserButton" Property="PI_PORTAL_LOGIN" Value="[DSOP_UPN]" Order="3"><![CDATA[DSOP_UPN <> ""]]></Publish>
<Publish Dialog="PUserAccountDlg" Control="SelectUserButton" Property="PI_PORTAL_LOGIN" Value="[DSOP_NAME]" Order="3"><![CDATA[DSOP_NAME <> "" AND DSOP_UPN = ""]]></Publish>
<!--ESUrlDlg-->
<Publish Dialog="ESUrlDlg" Control="Back" Event="NewDialog" Value="PUserAccountDlg">1</Publish>
<Publish Dialog="ESUrlDlg" Control="Back" Event="NewDialog" Value="ServerAdminPasswordDlg" Order="4"><![CDATA[&EnterpriseServerFeature=-1 AND !EnterpriseServerFeature=3]]></Publish>
<Publish Dialog="ESUrlDlg" Control="Back" Event="NewDialog" Value="ServerPasswordDlg" Order="3"><![CDATA[&ServerFeature=-1 AND !ServerFeature=3]]></Publish>
<Publish Dialog="ESUrlDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="2"><![CDATA[&PortalFeature=-1 AND !PortalFeature=3]]></Publish>
<Publish Dialog="ESUrlDlg" Control="Back" Event="NewDialog" Value="PUserAccountDlg" Order="1">1</Publish>
<Publish Dialog="ESUrlDlg" Control="Next" Event="NewDialog" Value="DatabaseConnectionDlg" Order="2"><![CDATA[&SchedulerServiceFeature=3]]></Publish>
<Publish Dialog="ESUrlDlg" Control="Next" Event="NewDialog" Value="CustomVerifyReadyDlg" Order="1">1</Publish>
<Publish Dialog="ESUrlDlg" Control="Cancel" Event="SpawnDialog" Value="CancelDlg">1</Publish>
<!--CustomVerifyReadyDlg-->
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="DatabaseConnectionDlg" Order="16"><![CDATA[&SchedulerServiceFeature=3 AND NOT(&EnterpriseServerFeature=3)]]></Publish>
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="ESUrlDlg" Order="15"><![CDATA[&PortalFeature=3 AND NOT(&EnterpriseServerFeature=3)]]></Publish>
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="PUserAccountDlg" Order="14"><![CDATA[&PortalFeature=3 AND &EnterpriseServerFeature=3]]></Publish>
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="DatabaseConnectionDlg" Order="13"><![CDATA[&EnterpriseServerFeature=3 AND &PortalFeature<>3]]></Publish>
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="ServerPasswordDlg" Order="12"><![CDATA[&ServerFeature=3 AND &EnterpriseServerFeature<>3 AND &PortalFeature<>3]]></Publish>
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="ESUrlDlg" Order="19"><![CDATA[&PortalFeature=-1 AND !PortalFeature=3]]></Publish>
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="ServerPasswordDlg" Order="18"><![CDATA[&ServerFeature=-1 AND !ServerFeature=3]]></Publish>
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="ServerAdminPasswordDlg" Order="17"><![CDATA[&EnterpriseServerFeature=-1 AND !EnterpriseServerFeature=3]]></Publish>
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="DatabaseConnectionDlg" Order="16"><![CDATA[&SchedulerServiceFeature=3 AND NOT(&EnterpriseServerFeature=3) AND COMPFOUND_SCHEDULER=0]]></Publish>
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="ESUrlDlg" Order="15"><![CDATA[&PortalFeature=3 AND NOT(&EnterpriseServerFeature=3) AND COMPFOUND_PORTAL=0]]></Publish>
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="PUserAccountDlg" Order="14"><![CDATA[&PortalFeature=3 AND &EnterpriseServerFeature=3 AND COMPFOUND_PORTAL=0]]></Publish>
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="DatabaseConnectionDlg" Order="13"><![CDATA[&EnterpriseServerFeature=3 AND &PortalFeature<>3 AND COMPFOUND_ESERVER=0]]></Publish>
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="ServerPasswordDlg" Order="12"><![CDATA[&ServerFeature=3 AND &EnterpriseServerFeature<>3 AND &PortalFeature<>3 AND COMPFOUND_SERVER=0]]></Publish>
<Publish Dialog="CustomVerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1">1</Publish>
<!--FinishDlg-->
<Publish Dialog="FinishDlg" Control="Next" Event="NewDialog" Value="FinishDlg">1</Publish>
<!--ValidateDlg-->
<Publish Dialog="ValidateDlg" Control="Ok" Event="EndDialog" Value="Return">1</Publish>
<ProgressText Action="CA_InstallWebFeatures">Please wait while [ProductName] Installer configures IIS &amp; ASP.NET, this may take a few minutes. Thanks!</ProgressText>
</UI>
<Icon Id="WebSitePanel.ico" SourceFile="WebSitePanel.ico" />
<Binary Id="Assembly_CA" SourceFile="bin\WebsitePanel.WIXInstaller.CA.dll" />
@ -476,7 +493,7 @@
<!--SQL props.-->
<Property Id="DB_SERVER" Secure="yes" Value="localhost\SQLExpress" />
<Property Id="DB_CONN" Secure="yes" />
<Property Id="DB_DATABASE" Secure="yes" />
<Property Id="DB_DATABASE" Secure="yes" Value="WebsitePanel" />
<Property Id="DB_AUTH" Secure="yes" Value="Windows Authentication" />
<Property Id="DB_LOGIN" Secure="yes" />
<Property Id="DB_PASSWORD" Secure="yes" />
@ -503,7 +520,7 @@
<Property Id="PI_SERVER_IP" Secure="yes" Value="127.0.0.1" />
<Property Id="PI_SERVER_PORT" Secure="yes" Value="9003" />
<Property Id="PI_SERVER_HOST" Secure="yes" />
<Property Id="PI_SERVER_LOGIN" Secure="yes" />
<Property Id="PI_SERVER_LOGIN" Secure="yes" Value="WPServer"/>
<Property Id="PI_SERVER_PASSWORD" Secure="yes" />
<Property Id="PI_SERVER_PASSWORD_CONFIRM" Secure="yes" />
<Property Id="PI_SERVER_DOMAIN" Secure="yes" />
@ -512,7 +529,7 @@
<Property Id="PI_ESERVER_IP" Secure="yes" Value="127.0.0.1" />
<Property Id="PI_ESERVER_PORT" Secure="yes" Value="9002" />
<Property Id="PI_ESERVER_HOST" Secure="yes" />
<Property Id="PI_ESERVER_LOGIN" Secure="yes" />
<Property Id="PI_ESERVER_LOGIN" Secure="yes" Value="WPEnterpriseServer"/>
<Property Id="PI_ESERVER_PASSWORD" Secure="yes" />
<Property Id="PI_ESERVER_PASSWORD_CONFIRM" Secure="yes" />
<Property Id="PI_ESERVER_DOMAIN" Secure="yes" />
@ -522,7 +539,7 @@
<Property Id="PI_PORTAL_IP" Secure="yes" Value="127.0.0.1" />
<Property Id="PI_PORTAL_PORT" Secure="yes" Value="9001" />
<Property Id="PI_PORTAL_HOST" Secure="yes" />
<Property Id="PI_PORTAL_LOGIN" Secure="yes" />
<Property Id="PI_PORTAL_LOGIN" Secure="yes" Value="WPPortal" />
<Property Id="PI_PORTAL_PASSWORD" Secure="yes" />
<Property Id="PI_PORTAL_PASSWORD_CONFIRM" Secure="yes" />
<Property Id="PI_PORTAL_DOMAIN" Secure="yes" />
@ -539,9 +556,15 @@
<!---->
<Property Id="VALIDATE_OK" Secure="yes" Value="0" />
<Property Id="VALIDATE_MSG" Secure="yes" />
<Property Id ="WSP_ROOT" Secure="yes">
<RegistrySearch Id='Search_WSP_ROOT' Root='HKCU' Key='SOFTWARE\[ProductName]' Name='Root' Type='raw' />
<Property Id="WSP_BASE" Secure="yes">
<RegistrySearch Id='Search_WSP_BASE' Root='HKLM' Key='SOFTWARE\[ProductName]' Name='Base' Type='raw' />
</Property>
<!--Was found an existing installation (configuration) on local pc. COMPFOUND stands for COMPonent FOUND.-->
<Property Id="COMPFOUND_SERVER" Secure="yes" Value="0" />
<Property Id="COMPFOUND_ESERVER" Secure="yes" Value="0" />
<Property Id="COMPFOUND_PORTAL" Secure="yes" Value="0" />
<Property Id="COMPFOUND_WDPORTAL" Secure="yes" Value="1" />
<Property Id="COMPFOUND_SCHEDULER" Secure="yes" Value="1" />
<!--CustomActions.-->
<!-- <CustomAction Id='AlreadyUpdated' Error='Product has already been updated to $(var.VERSION) or newer.' />
<CustomAction Id='NoDowngrade' Error='A later version of [ProductName] is already installed.' /> -->
@ -576,7 +599,7 @@
<CustomAction Id="CA_PropertyOnServerInstall" Property="CA_OnServerInstall" Value="ApplicationName=$(var.NAME);ComponentName=$(var.ServerTitle);ComponentCode=server;ComponentDescription=$(var.ServerDescription);Version=$(var.VERSION);InstallationFolder=[INSTALLSERVERFOLDER];InstallerFolder=[WEBSITEPANELDIR];Installer=[];InstallerType=[];InstallerPath=[];IISVersion=[];SetupXml=[];WebSiteIP=[PI_SERVER_IP];WebSitePort=[PI_SERVER_PORT];WebSiteDomain=[PI_SERVER_HOST];UserDomain=[PI_SERVER_DOMAIN];UserAccount=[PI_SERVER_LOGIN];UserPassword=[PI_SERVER_PASSWORD];ServerPassword=[SERVER_ACCESS_PASSWORD];EnterpriseServerUrl=[PI_ESERVER_URL];ServerAdminPassword=[SERVERADMIN_PASSWORD];DatabaseServer=[DB_SERVER];DatabaseName=[DB_DATABASE];DbServerAdmin=[DB_LOGIN];DbServerAdminPassword=[DB_PASSWORD];BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" />
<CustomAction Id="CA_OnServerInstall" BinaryKey ="Assembly_CA" DllEntry="OnServerInstall" Impersonate="no" Execute="deferred" HideTarget="no"/>
<!--EServer.-->
<CustomAction Id="CA_PropertyOnEServerInstall" Property="CA_OnEServerInstall" Value="ApplicationName=$(var.NAME);ComponentName=$(var.EServerTitle);ComponentCode=enterpriseserver;ComponentDescription=$(var.EServerDescription);Version=$(var.VERSION);InstallationFolder=[INSTALLENTERPRISESERVERFOLDER];InstallerFolder=[WEBSITEPANELDIR];Installer=[];InstallerType=[];InstallerPath=[];IISVersion=[];SetupXml=[];WebSiteIP=[PI_ESERVER_IP];WebSitePort=[PI_ESERVER_PORT];WebSiteDomain=[PI_ESERVER_HOST];UserDomain=[PI_ESERVER_DOMAIN];UserAccount=[PI_ESERVER_LOGIN];UserPassword=[PI_ESERVER_PASSWORD];ServerPassword=[SERVER_ACCESS_PASSWORD];EnterpriseServerUrl=[PI_ESERVER_URL];ServerAdminPassword=[SERVERADMIN_PASSWORD];DatabaseServer=[DB_SERVER];DatabaseName=[DB_DATABASE];DbServerAdmin=[DB_LOGIN];DbServerAdminPassword=[DB_PASSWORD];BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" />
<CustomAction Id="CA_PropertyOnEServerInstall" Property="CA_OnEServerInstall" Value="ApplicationName=$(var.NAME);ComponentName=$(var.EServerTitle);ComponentCode=enterprise server;ComponentDescription=$(var.EServerDescription);Version=$(var.VERSION);InstallationFolder=[INSTALLENTERPRISESERVERFOLDER];InstallerFolder=[WEBSITEPANELDIR];Installer=[];InstallerType=[];InstallerPath=[];IISVersion=[];SetupXml=[];WebSiteIP=[PI_ESERVER_IP];WebSitePort=[PI_ESERVER_PORT];WebSiteDomain=[PI_ESERVER_HOST];UserDomain=[PI_ESERVER_DOMAIN];UserAccount=[PI_ESERVER_LOGIN];UserPassword=[PI_ESERVER_PASSWORD];ServerPassword=[SERVER_ACCESS_PASSWORD];EnterpriseServerUrl=[PI_ESERVER_URL];ServerAdminPassword=[SERVERADMIN_PASSWORD];DatabaseServer=[DB_SERVER];DatabaseName=[DB_DATABASE];DbServerAdmin=[DB_LOGIN];DbServerAdminPassword=[DB_PASSWORD];BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" />
<CustomAction Id="CA_OnEServerInstall" BinaryKey ="Assembly_CA" DllEntry="OnEServerInstall" Impersonate="no" Execute="deferred" HideTarget="no"/>
<!--Portal.-->
<CustomAction Id="CA_PropertyOnPortalInstall" Property="CA_OnPortalInstall" Value="ApplicationName=$(var.NAME);ComponentName=$(var.PortalTitle);ComponentCode=portal;ComponentDescription=$(var.PortalDescription);Version=$(var.VERSION);InstallationFolder=[INSTALLPORTALFOLDER];InstallerFolder=[WEBSITEPANELDIR];Installer=[];InstallerType=[];InstallerPath=[];IISVersion=[];SetupXml=[];WebSiteIP=[PI_PORTAL_IP];WebSitePort=[PI_PORTAL_PORT];WebSiteDomain=[PI_PORTAL_HOST];UserDomain=[PI_PORTAL_DOMAIN];UserAccount=[PI_PORTAL_LOGIN];UserPassword=[PI_PORTAL_PASSWORD];ServerPassword=[SERVER_ACCESS_PASSWORD];EnterpriseServerUrl=[PI_ESERVER_URL];ServerAdminPassword=[SERVERADMIN_PASSWORD];DatabaseServer=[DB_SERVER];DatabaseName=[DB_DATABASE];DbServerAdmin=[DB_LOGIN];DbServerAdminPassword=[DB_PASSWORD];BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" />
@ -584,15 +607,23 @@
<!--Run corresponding uninstall scripts.-->
<CustomAction Id="CA_PropertyOnServerRemove" Property="CA_OnServerRemove" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=server;BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" />
<CustomAction Id="CA_OnServerRemove" BinaryKey="Assembly_CA" DllEntry="OnServerRemove" Impersonate="no" Execute="deferred" HideTarget="no" />
<CustomAction Id="CA_PropertyOnEServerRemove" Property="CA_OnEServerRemove" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=enterpriseserver;BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" />
<CustomAction Id="CA_PropertyOnEServerRemove" Property="CA_OnEServerRemove" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=enterprise server;BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" />
<CustomAction Id="CA_OnEServerRemove" BinaryKey="Assembly_CA" DllEntry="OnEServerRemove" Impersonate="no" Execute="deferred" HideTarget="no" />
<CustomAction Id="CA_PropertyOnPortalRemove" Property="CA_OnPortalRemove" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=portal;BaseDirectory=[WEBSITEPANELDIR];MODE_UP=[WIX_UPGRADE_DETECTED];MODE_RUP=[UPGRADINGPRODUCTCODE]" />
<CustomAction Id="CA_OnPortalRemove" BinaryKey="Assembly_CA" DllEntry="OnPortalRemove" Impersonate="no" Execute="deferred" HideTarget="no" />
<!--Maintenance mode.-->
<CustomAction Id="CA_PropertyMaintenanceServer" Property="CA_MaintenanceServer" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=server;BaseDirectory=[WEBSITEPANELDIR];ServerPassword=[SERVER_ACCESS_PASSWORD]" />
<CustomAction Id="CA_MaintenanceServer" BinaryKey="Assembly_CA" DllEntry="MaintenanceServer" Impersonate="no" Execute="deferred" HideTarget="no" />
<CustomAction Id="CA_PropertyMaintenanceEServer" Property="CA_MaintenanceEServer" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=enterprise server;BaseDirectory=[WEBSITEPANELDIR];ServerAdminPassword=[SERVERADMIN_PASSWORD];" />
<CustomAction Id="CA_MaintenanceEServer" BinaryKey="Assembly_CA" DllEntry="MaintenanceEServer" Impersonate="no" Execute="deferred" HideTarget="no" />
<CustomAction Id="CA_PropertyMaintenancePortal" Property="CA_MaintenancePortal" Value="InstallerFolder=[WEBSITEPANELDIR];ComponentCode=portal;BaseDirectory=[WEBSITEPANELDIR];EnterpriseServerUrl=[PI_ESERVER_URL]" />
<CustomAction Id="CA_MaintenancePortal" BinaryKey="Assembly_CA" DllEntry="MaintenancePortal" Impersonate="no" Execute="deferred" HideTarget="no" />
<!---->
<SetProperty Id="WEBSITEPANELDIR" After="AppSearch" Value="[WSP_ROOT]">WSP_ROOT</SetProperty>
<SetProperty Id="WEBSITEPANELDIR" After="AppSearch" Value="[WSP_BASE]">WSP_BASE</SetProperty>
<CustomAction Id="CA_PreFillSettings" BinaryKey="Assembly_CA" DllEntry="PreFillSettings" />
<!--Exe sequence.-->
<InstallExecuteSequence>
<Custom Action="CA_InstallWebFeatures" After="InstallValidate"><![CDATA[(&ServerFeature=3) OR (&EnterpriseServerFeature=3) OR (&PortalFeature=3) OR (&SchedulerServiceFeature=3) OR (&WDPortalFeature=3)]]></Custom>
<Custom Action="CA_InstallWebFeatures" Before="CostInitialize"><![CDATA[(&ServerFeature=3) OR (&EnterpriseServerFeature=3) OR (&PortalFeature=3) OR (&SchedulerServiceFeature=3) OR (&WDPortalFeature=3)]]></Custom>
<!--<Custom Action="CA_PropertyFinalizeInstall" After='InstallValidate'/>
<Custom Action="CA_FinalizeUnInstall" After="InstallValidate">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
<Custom Action="CA_FinalizeInstall" After="InstallFiles" >NOT Installed or REINSTALL</Custom>-->
@ -609,9 +640,19 @@
<Custom Action="CA_PropertyOnEServerRemove" After="InstallInitialize"><![CDATA[(&EnterpriseServerFeature=2) AND (!EnterpriseServerFeature=3)]]></Custom>
<Custom Action="CA_OnEServerRemove" Before="StopServices"><![CDATA[(&EnterpriseServerFeature=2) AND (!EnterpriseServerFeature=3)]]></Custom>
<Custom Action="CA_PropertyOnPortalRemove" After="InstallInitialize"><![CDATA[(&PortalFeature=2) AND (!PortalFeature=3)]]></Custom>
<Custom Action="CA_OnPortalRemove" After="CA_PropertyOnPortalRemove"><![CDATA[(&PortalFeature=2) AND (!PortalFeature=3)]]></Custom>
<Custom Action="CA_OnPortalRemove" After="CA_PropertyOnPortalRemove"><![CDATA[(&PortalFeature=2) AND (!PortalFeature=3)]]></Custom>
<!--Maintenance.-->
<Custom Action="CA_PropertyMaintenanceServer" After="InstallInitialize"><![CDATA[&ServerFeature=-1 AND !ServerFeature=3]]></Custom>
<Custom Action="CA_MaintenanceServer" After="CA_PropertyMaintenanceServer"><![CDATA[&ServerFeature=-1 AND !ServerFeature=3]]></Custom>
<Custom Action="CA_PropertyMaintenanceEServer" After="InstallInitialize"><![CDATA[&EnterpriseServerFeature=-1 AND !EnterpriseServerFeature=3]]></Custom>
<Custom Action="CA_MaintenanceEServer" After="CA_PropertyMaintenanceEServer"><![CDATA[&EnterpriseServerFeature=-1 AND !EnterpriseServerFeature=3]]></Custom>
<Custom Action="CA_PropertyMaintenancePortal" After="InstallInitialize"><![CDATA[&PortalFeature=-1 AND !PortalFeature=3]]></Custom>
<Custom Action="CA_MaintenancePortal" After="CA_PropertyMaintenancePortal"><![CDATA[&PortalFeature=-1 AND !PortalFeature=3]]></Custom>
<!---->
<!--<Custom Action="CA_PreFillSettings" After="SetWEBSITEPANELDIR">1</Custom>-->
</InstallExecuteSequence>
<InstallUISequence>
<Custom Action="CA_PreFillSettings" Before="CA_InstallWebFeatures" />
<Custom Action="CA_InstallWebFeatures" Before="CA_PrereqCheck" />
<Custom Action="CA_PrereqCheck" After ="CostInitialize" />
<Custom Action="CA_PrereqCheckUI" After ="CA_PrereqCheck" />
@ -630,7 +671,7 @@
<DirectoryRef Id="INSTALLENTERPRISESERVERFOLDER">
<Component Id="InstallDatabaseSql" Guid="{81FB6008-A445-464F-8A0E-2EE076027FF3}">
<CreateFolder />
<Condition>(NOT Installed OR NOT WIX_UPGRADE_DETECTED) AND NOT(DB_AUTH = "Windows Authentication")</Condition>
<Condition>(NOT Installed AND NOT WIX_UPGRADE_DETECTED) AND NOT(DB_AUTH = "Windows Authentication")</Condition>
<util:User Id="SqlUser" Name="[DB_LOGIN]" Password="[DB_PASSWORD]" CreateUser="no" />
<sql:SqlDatabase Id="SqlDatabaseInstallSql" ConfirmOverwrite="yes" ContinueOnError="no" CreateOnInstall="yes" CreateOnReinstall="no" CreateOnUninstall="no"
DropOnInstall="no" DropOnReinstall="no" DropOnUninstall="no"
@ -654,7 +695,7 @@
</Component>
<Component Id="InstallDatabaseWin" Guid="{C50FC58C-3EF3-452D-BA9B-C9513B4D941A}">
<CreateFolder />
<Condition>(NOT Installed OR NOT WIX_UPGRADE_DETECTED) AND (DB_AUTH = "Windows Authentication")</Condition>
<Condition>(NOT Installed AND NOT WIX_UPGRADE_DETECTED) AND (DB_AUTH = "Windows Authentication")</Condition>
<sql:SqlDatabase Id="SqlDatabaseInstallWin" ConfirmOverwrite="yes" ContinueOnError="no" CreateOnInstall="yes" CreateOnReinstall="no" CreateOnUninstall="no"
DropOnInstall="no" DropOnReinstall="no" DropOnUninstall="no"
Server="[DB_SERVER]"
@ -680,9 +721,9 @@
<Component Id ="comp_WebsitePanel_config" Directory="WEBSITEPANELDIR" Guid="{28CD1ADB-562C-4E38-A3B6-325D3A2718B1}">
<File Id="file_WebsitePanel_config" KeyPath="yes" Source="WebsitePanel.config" />
</Component>
<Component Directory="WEBSITEPANELDIR">
<RegistryValue Root='HKCU' Key='SOFTWARE\[ProductName]'
Name='Root' Value='[WEBSITEPANELDIR]'
<Component Id="comp_WebsitePanel_reg_locator" Directory="WEBSITEPANELDIR" Guid="{CC35E1B5-3E29-4AD1-991C-2904E4DCB099}">
<RegistryValue Root='HKLM' Key='SOFTWARE\[ProductName]'
Name='Base' Value='[WEBSITEPANELDIR]'
Type='string' />
</Component>
</ComponentGroup>

View file

@ -651,12 +651,11 @@ namespace WebsitePanel.Setup.Actions
user.IsPeer = false;
user.HtmlMail = true;
user.Username = loginName;
user.Password = password;
user.FirstName = firstName;
user.LastName = lastName;
user.Email = email;
int userId = ES.Services.Users.AddUser(user, false);
int userId = ES.Services.Users.AddUser(user, false, password);
if (userId > 0)
{
Log.WriteEnd("Added user account");

View file

@ -39,6 +39,7 @@ namespace WebsitePanel.Setup
public const string DefaultInstallPathRoot = @"C:\WebsitePanel";
public const string LoopbackIPv4 = "127.0.0.1";
public const string InstallerProductCode = "cfg core";
public const string DefaultProductName = "WebsitePanel";
public abstract class Parameters
{

View file

@ -88,7 +88,8 @@ namespace WebsitePanel.Setup
SwitchServer2AspNet40,
SwitchEntServer2AspNet40,
SwitchWebPortal2AspNet40,
ConfigureSecureSessionModuleInWebConfig
ConfigureSecureSessionModuleInWebConfig,
RestoreConfig
}
public class InstallAction

View file

@ -322,12 +322,30 @@ namespace WebsitePanel.Setup
case WindowsVersion.WindowsServer2008:
ret = "Windows Server 2008";
break;
case WindowsVersion.WindowsServer2008R2:
ret = "Windows Server 2008 R2";
break;
case WindowsVersion.WindowsServer2012:
ret = "Windows Server 2012";
break;
case WindowsVersion.WindowsServer2012R2:
ret = "Windows Server 2012 R2";
break;
case WindowsVersion.WindowsVista:
ret = "Windows Vista";
break;
case WindowsVersion.WindowsXP:
ret = "Windows XP";
break;
case WindowsVersion.Windows7:
ret = "Windows 7";
break;
case WindowsVersion.Windows8:
ret = "Windows 8";
break;
default:
ret = "Windows";
break;
}
return ret;
}

View file

@ -94,6 +94,9 @@ namespace WebsitePanel.Setup.Internal
case SetupActions.Uninstall:
Uninstall();
break;
case SetupActions.Setup:
Maintenance();
break;
default:
throw new NotImplementedException();
}
@ -101,6 +104,7 @@ namespace WebsitePanel.Setup.Internal
protected abstract void Install();
protected abstract void Uninstall();
protected abstract void Maintenance();
/// <summary>
/// LoadSetupVariablesFromParameters.
@ -166,9 +170,13 @@ namespace WebsitePanel.Setup.Internal
}
public static string GetComponentID(SetupVariables Ctx)
{
var XmlPath = string.Format("//component[.//add/@key='ComponentCode' and .//add/@value='{0}']", Ctx.ComponentCode);
return GetComponentID(GetFullConfigPath(Ctx), Ctx.ComponentCode);
}
public static string GetComponentID(string Cfg, string ComponentCode)
{
var XmlPath = string.Format("//component[.//add/@key='ComponentCode' and .//add/@value='{0}']", ComponentCode);
var Xml = new XmlDocument();
Xml.Load(GetFullConfigPath(Ctx));
Xml.Load(Cfg);
var Node = Xml.SelectSingleNode(XmlPath) as XmlElement;
return Node == null ? null : Node.GetAttribute("id");
}
@ -393,6 +401,9 @@ namespace WebsitePanel.Setup.Internal
case ActionTypes.ConfigureSecureSessionModuleInWebConfig:
ConfigureSecureSessionModuleInWebConfig();
break;
case ActionTypes.RestoreConfig:
RestoreXmlConfigs(Execute.SetupVariables);
break;
}
}
catch (Exception ex)
@ -402,7 +413,6 @@ namespace WebsitePanel.Setup.Internal
}
}
}
protected virtual List<InstallAction> GetActions(string ComponentID)
{
return new List<InstallAction>();
@ -843,7 +853,7 @@ namespace WebsitePanel.Setup.Internal
return;
}
// Load web.config
XmlDocument doc = new XmlDocument();
var doc = new XmlDocument();
doc.Load(webConfigPath);
// add node:
@ -993,7 +1003,7 @@ namespace WebsitePanel.Setup.Internal
return;
}
// Load web.config
XmlDocument doc = new XmlDocument();
var doc = new XmlDocument();
doc.Load(webConfigPath);
// do Windows 2008 platform-specific changes
bool iis7 = (Context.IISVersion.Major >= 7);
@ -1229,7 +1239,7 @@ namespace WebsitePanel.Setup.Internal
private string GetConnectionString(string webConfigPath)
{
string ret = null;
XmlDocument doc = new XmlDocument();
var doc = new XmlDocument();
doc.Load(webConfigPath);
//connection string
string xPath = "configuration/connectionStrings/add[@name=\"EnterpriseServer\"]";
@ -1244,7 +1254,7 @@ namespace WebsitePanel.Setup.Internal
private string GetCryptoKey(string webConfigPath)
{
string ret = null;
XmlDocument doc = new XmlDocument();
var doc = new XmlDocument();
doc.Load(webConfigPath);
//crypto key
string xPath = "configuration/appSettings/add[@key=\"WebsitePanel.CryptoKey\"]";
@ -1258,7 +1268,7 @@ namespace WebsitePanel.Setup.Internal
private bool IsEncryptionEnabled(string webConfigPath)
{
XmlDocument doc = new XmlDocument();
var doc = new XmlDocument();
doc.Load(webConfigPath);
//encryption enabled
string xPath = "configuration/appSettings/add[@key=\"WebsitePanel.EncryptionEnabled\"]";
@ -1710,12 +1720,11 @@ namespace WebsitePanel.Setup.Internal
user.IsPeer = false;
user.HtmlMail = true;
user.Username = loginName;
user.Password = password;
user.FirstName = firstName;
user.LastName = lastName;
user.Email = email;
int userId = ES.Services.Users.AddUser(user, false);
int userId = ES.Services.Users.AddUser(user, false, password);
if (userId > 0)
{
Log.WriteEnd("Added user account");
@ -2316,7 +2325,7 @@ namespace WebsitePanel.Setup.Internal
}
Log.WriteStart("Updating config.xml file");
XmlDocument doc = new XmlDocument();
var doc = new XmlDocument();
doc.Load(path);
XmlNode serversNode = doc.SelectSingleNode("//myLittleAdmin/sqlservers");
@ -2429,7 +2438,7 @@ namespace WebsitePanel.Setup.Internal
return;
}
// Load web.config
XmlDocument doc = new XmlDocument();
var doc = new XmlDocument();
doc.Load(webConfigPath);
// Tighten WSE security on local machine
@ -2513,7 +2522,7 @@ namespace WebsitePanel.Setup.Internal
}
Log.WriteStart("Loading portal settings");
XmlDocument doc = new XmlDocument();
var doc = new XmlDocument();
doc.Load(path);
string xPath = "configuration/connectionStrings/add[@name=\"SiteSqlServer\"]";
@ -2605,7 +2614,7 @@ namespace WebsitePanel.Setup.Internal
}
Log.WriteStart("Updating site settings");
XmlDocument doc = new XmlDocument();
var doc = new XmlDocument();
doc.Load(path);
XmlElement urlNode = doc.SelectSingleNode("SiteSettings/EnterpriseServer") as XmlElement;
@ -3178,7 +3187,7 @@ namespace WebsitePanel.Setup.Internal
}
Log.WriteStart("Updating configuration file (server password)");
XmlDocument doc = new XmlDocument();
var doc = new XmlDocument();
doc.Load(path);
XmlElement passwordNode = doc.SelectSingleNode("//websitepanel.server/security/password") as XmlElement;
@ -3221,7 +3230,7 @@ namespace WebsitePanel.Setup.Internal
}
Log.WriteStart("Updating configuration file (service settings)");
XmlDocument doc = new XmlDocument();
var doc = new XmlDocument();
doc.Load(path);
XmlElement ipNode = doc.SelectSingleNode("//configuration/appSettings/add[@key='WebsitePanel.HostIP']") as XmlElement;
@ -3881,7 +3890,7 @@ namespace WebsitePanel.Setup.Internal
return;
}
// Load web.config
XmlDocument doc = new XmlDocument();
var doc = new XmlDocument();
doc.Load(webConfigPath);
// replace existing node:
@ -3915,8 +3924,61 @@ namespace WebsitePanel.Setup.Internal
}
#endregion
#endregion
private void RestoreXmlConfigs(SetupVariables Ctx)
{
try
{
Log.WriteStart("RestoreXmlConfigs");
var Backup = BackupRestore.Find(Ctx.InstallerFolder, Global.DefaultProductName, Ctx.ComponentName);
switch(Ctx.ComponentCode)
{
case Global.Server.ComponentCode:
{
Backup.XmlFiles.Add("Web.config");
}
break;
case Global.EntServer.ComponentCode:
{
Backup.XmlFiles.Add("Web.config");
}
break;
case Global.WebPortal.ComponentCode:
{
Backup.XmlFiles.Add("Web.config");
Backup.XmlFiles.Add(@"App_Data\Countries.config");
Backup.XmlFiles.Add(@"App_Data\CountryStates.config");
Backup.XmlFiles.Add(@"App_Data\Ecommerce_Modules.config");
Backup.XmlFiles.Add(@"App_Data\Ecommerce_Pages.config");
Backup.XmlFiles.Add(@"App_Data\ESModule_ControlsHierarchy.config");
Backup.XmlFiles.Add(@"App_Data\ModulesData.config");
Backup.XmlFiles.Add(@"App_Data\SiteSettings.config");
Backup.XmlFiles.Add(@"App_Data\SupportedLocales.config");
Backup.XmlFiles.Add(@"App_Data\SupportedThemes.config");
Backup.XmlFiles.Add(@"App_Data\WebsitePanel_Modules.config");
Backup.XmlFiles.Add(@"App_Data\WebsitePanel_Pages.config");
}
break;
}
var MainCfg = Path.Combine(Ctx.InstallerFolder, BackupRestore.MainConfig);
if (!BackupRestore.HaveChild(MainCfg, "//components"))
{
Log.WriteInfo("Restoring main config...");
XmlDocumentMerge.Process(Backup.BackupMainConfigFile, MainCfg);
Context.ComponentId = WiXSetup.GetComponentID(Ctx);
AppConfig.LoadConfiguration(new ExeConfigurationFileMap { ExeConfigFilename = MainCfg });
AppConfig.LoadComponentSettings(Ctx);
}
Log.WriteInfo(string.Format("Restoring xml config for component - {0}.", Ctx.ComponentFullName));
Backup.Restore();
Log.WriteEnd("RestoreXmlConfigs");
}
catch (Exception ex)
{
Log.WriteError("RestoreXmlConfigs", ex);
throw;
}
}
}
public class UninstallScript : SetupScript // UninstallPage
{
public UninstallScript(SetupVariables SessionVariables):base(SessionVariables)
@ -4117,12 +4179,22 @@ namespace WebsitePanel.Setup.Internal
protected override List<InstallAction> GetActions(string ComponentID)
{
var Scenario = base.GetActions(ComponentID);
var Act = new InstallAction(ActionTypes.UpdateConfig);
Act.Description = "Updating system configuration...";
Scenario.Add(Act);
Act = new InstallAction(ActionTypes.StartApplicationPool);
Act.Description = "Starting IIS Application Pool...";
Scenario.Add(Act);
Scenario.Add(new InstallAction(ActionTypes.RestoreConfig) { SetupVariables = Context, Description = "Restoring xml configuration files..." });
Scenario.Add(new InstallAction(ActionTypes.UpdateConfig) { Description = "Updating system configuration..." });
Scenario.Add(new InstallAction(ActionTypes.StartApplicationPool) { Description = "Starting IIS Application Pool..." });
return Scenario;
}
}
public class MaintenanceScript: ExpressScript
{
public MaintenanceScript(SetupVariables SessionVariables):base(SessionVariables)
{
Context.SetupAction = SetupActions.Setup;
}
protected override List<InstallAction> GetActions(string ComponentID)
{
var Scenario = base.GetActions(ComponentID);
Scenario.Add(new InstallAction(ActionTypes.UpdateConfig) { Description = "Updating system configuration..." });
return Scenario;
}
}
@ -4170,6 +4242,7 @@ namespace WebsitePanel.Setup.Internal
else if (ModeExtension == ModeExtension.Restore)
{
Context.ComponentId = GetComponentID(Context);
Context.UpdateVersion = Context.Release;
AppConfig.LoadComponentSettings(Context);
new RestoreScript(Context).Run();
}
@ -4194,12 +4267,19 @@ namespace WebsitePanel.Setup.Internal
}
Script.Run();
}
protected override void Maintenance()
{
Context.ComponentId = GetComponentID(Context);
AppConfig.LoadComponentSettings(Context);
SetupScript Script = new MaintenanceScript(Context);
Script.Actions.Add(new InstallAction(ActionTypes.UpdateServerPassword) { Description = "Updating server password..." });
Script.Run();
}
}
public class EServerSetup : WiXSetup
{
public EServerSetup(SetupVariables Ctx)
: base(Ctx)
public EServerSetup(SetupVariables Ctx, ModeExtension Ext)
: base(Ctx, Ext)
{
}
@ -4210,7 +4290,7 @@ namespace WebsitePanel.Setup.Internal
SetupVars.SetupAction = Action;
SetupVars.IISVersion = Global.IISVersion;
AppConfig.LoadConfiguration(new ExeConfigurationFileMap { ExeConfigFilename = GetFullConfigPath(SetupVars) });
return new EServerSetup(SetupVars);
return new EServerSetup(SetupVars, GetModeExtension(Ctx));
}
protected override void Install()
{
@ -4240,6 +4320,7 @@ namespace WebsitePanel.Setup.Internal
else if (ModeExtension == ModeExtension.Restore)
{
Context.ComponentId = GetComponentID(Context);
Context.UpdateVersion = Context.Release;
AppConfig.LoadComponentSettings(Context);
new RestoreScript(Context).Run();
}
@ -4264,12 +4345,19 @@ namespace WebsitePanel.Setup.Internal
}
Script.Run();
}
protected override void Maintenance()
{
Context.ComponentId = GetComponentID(Context);
AppConfig.LoadComponentSettings(Context);
SetupScript Script = new MaintenanceScript(Context);
Script.Actions.Add(new InstallAction(ActionTypes.UpdateServerAdminPassword) { Description = "Updating serveradmin password..." });
Script.Run();
}
}
public class PortalSetup : WiXSetup
{
public PortalSetup(SetupVariables Ctx)
: base(Ctx)
public PortalSetup(SetupVariables Ctx, ModeExtension Ext)
: base(Ctx, Ext)
{
}
@ -4280,7 +4368,7 @@ namespace WebsitePanel.Setup.Internal
SetupVars.SetupAction = Action;
SetupVars.IISVersion = Global.IISVersion;
AppConfig.LoadConfiguration(new ExeConfigurationFileMap { ExeConfigFilename = GetFullConfigPath(SetupVars) });
return new PortalSetup(SetupVars);
return new PortalSetup(SetupVars, GetModeExtension(Ctx));
}
protected override void Install()
{
@ -4306,17 +4394,11 @@ namespace WebsitePanel.Setup.Internal
}
if (WiXThrow)
InstallFailed();
else if (ModeExtension == ModeExtension.Restore)
{
Context.ComponentId = GetComponentID(Context);
AppConfig.LoadComponentSettings(Context);
new RestoreScript(Context).Run();
}
}
else if (ModeExtension == ModeExtension.Restore)
{
Context.ComponentId = GetComponentID(Context);
Context.UpdateVersion = Context.Release;
AppConfig.LoadComponentSettings(Context);
new RestoreScript(Context).Run();
}
@ -4348,8 +4430,15 @@ namespace WebsitePanel.Setup.Internal
}
Script.Run();
}
protected override void Maintenance()
{
Context.ComponentId = GetComponentID(Context);
AppConfig.LoadComponentSettings(Context);
SetupScript Script = new MaintenanceScript(Context);
Script.Actions.Add(new InstallAction(ActionTypes.UpdateEnterpriseServerUrl) { Description = "Updating site settings..." });
Script.Run();
}
}
#region WiXActionManagers
public class WiXServerActionManager : BaseActionManager
{

View file

@ -0,0 +1,130 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Xml;
using Ionic.Zip;
namespace WebsitePanel.Setup.Internal
{
public class BackupRestore
{
struct DirectoryTag
{
public string Name;
public DateTime Date;
public Version Version;
}
public const string MainConfig = "WebsitePanel.config";
const string BackupDirectory = "Backup";
const string ConfigDirectory = "Config";
const string AppZip = @"App\app.zip";
const string DateFormat = "yyyy-MM-dd";
public BackupRestore()
{
XmlFiles = new List<string>();
}
public static BackupRestore Find(string Root, string Product, string Id)
{
var Result = default(BackupRestore);
var Dir = Path.Combine(Root, BackupDirectory);
var FullId = GetFullId(Product, Id);
if (Directory.Exists(Dir))
{
var DirList = new List<DirectoryTag>();
foreach (var DateItem in Directory.GetDirectories(Dir))
{
DateTime date;
var DateName = new DirectoryInfo(DateItem).Name;
if (DateTime.TryParseExact(DateName, DateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out date))
{
foreach (var VersionItem in Directory.GetDirectories(DateItem))
{
var VersionName = new DirectoryInfo(VersionItem).Name;
if (VersionName.StartsWith(FullId, StringComparison.InvariantCultureIgnoreCase))
{
Version BckpVersion;
var StrVersion = VersionName.Substring(FullId.Length);
if (Version.TryParse(StrVersion, out BckpVersion))
DirList.Add(new DirectoryTag { Name = VersionItem, Date = date, Version = BckpVersion });
}
}
}
}
var ByVersion = from i in DirList where i.Version == (from v in DirList select v.Version).Max() select i;
var ByDate = from i in ByVersion where i.Date == (from v in ByVersion select v.Date).Max() select i;
var SrcTag = ByDate.First();
Result = new BackupRestore { Id = Id, Root = GetComponentRoot(SrcTag, Id), BackupFile = Path.Combine(SrcTag.Name, AppZip), BackupMainConfigFile = GetMainConfig(SrcTag) };
}
return Result;
}
public static bool HaveChild(string XmlDocPath, string XmlPath)
{
var Result = false;
var XCfg = new XmlDocument();
XCfg.Load(XmlDocPath);
var Node = XCfg.SelectSingleNode(XmlPath);
if (Node != null)
Result = Node.ChildNodes.Count > 0;
return Result;
}
private static string GetComponentRoot(DirectoryTag DirTag, string Id)
{
var Cfg = GetMainConfig(DirTag);
if (string.IsNullOrWhiteSpace(Cfg))
throw new Exception("Broken backup. Main config file not found.");
var XCfg = new XmlDocument();
XCfg.Load(Cfg);
var Component = XCfg.SelectSingleNode(string.Format("//component[.//add/@key='ComponentName' and .//add/@value='{0}']", Id));
var InstallFolder = Component.SelectSingleNode(".//add[@key='InstallFolder']");
return InstallFolder.Attributes["value"].Value;
}
private static string GetMainConfig(DirectoryTag DirTag)
{
return Path.Combine(DirTag.Name, ConfigDirectory, MainConfig);
}
private static string GetFullId(string Product, string Id)
{
return string.Format("{0} {1}", Product, Id);
}
public virtual void Restore()
{
using (var Bckp = new ZipFile(BackupFile))
{
foreach (var Xml in XmlFiles)
{
var SrcEntry = from Entry in Bckp.Entries where NormalizePath(Entry.FileName.ToLowerInvariant(), "/") == Xml.ToLowerInvariant() select Entry;
if (SrcEntry != null)
{
if (SrcEntry.LongCount() > 1)
throw new Exception(string.Format("Too many backup entries - {0}.", Xml));
var FileEntry = SrcEntry.FirstOrDefault();
if (FileEntry != null)
{
using (var InMem = new MemoryStream())
{
FileEntry.Extract(InMem);
InMem.Seek(0, SeekOrigin.Begin);
using (var OutFile = new FileStream(Path.Combine(Root, Xml), FileMode.Open, FileAccess.ReadWrite))
{
XmlDocumentMerge.Process(InMem, OutFile);
}
}
}
}
}
}
}
private string NormalizePath(string FilePath, string In)
{
return Path.Combine(FilePath.Split(new string[] { In }, StringSplitOptions.RemoveEmptyEntries));
}
public string Id { get; set; } // Component full name.
public string Comment { get; set; }
public string BackupFile { get; set; } // Should be zip archive.
public string BackupMainConfigFile { get; set; }
public IList<string> XmlFiles { get; set; } // Xml files (configs) to merge and update.
public string Root { get; set; }
}
}

View file

@ -0,0 +1,139 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml;
using System.Xml.XPath;
namespace WebsitePanel.Setup.Internal
{
public static class XmlDocumentMerge
{
const string SuccessFormat = "Success: {0}.";
const string ErrorFormat = "Error: {0}.";
const string MergeCompleted = "XmlDocumentMerge completed";
static XmlDocumentMerge()
{
KeyAttributes = new List<string> { "name", "id", "key" };
}
public static List<string> KeyAttributes { get; set; }
public static string Process(string Src, string Dst, string SaveTo = "")
{
var Result = string.Empty;
if (!File.Exists(Src))
Result = string.Format(ErrorFormat, string.Format("source document [{0}] does not exists", Src));
else if (!File.Exists(Dst))
Result = string.Format(ErrorFormat, string.Format("destination document [{0}] does not exists", Dst));
else
{
try
{
var InStream = new FileStream(Src, FileMode.Open, FileAccess.Read);
var OutStream = new FileStream(Dst, FileMode.Open, FileAccess.ReadWrite);
Result = Process(InStream,
OutStream,
SaveTo);
InStream.Close();
OutStream.Flush();
OutStream.Close();
}
catch (Exception ex)
{
Result = string.Format(ErrorFormat, ex.ToString());
}
}
return Result;
}
public static string Process(Stream InSrc, Stream OutDst, string SaveTo = "")
{
var Result = string.Format(SuccessFormat, MergeCompleted);
try
{
var SrcDoc = new XmlDocument();
SrcDoc.Load(InSrc);
var DstDoc = new XmlDocument();
DstDoc.Load(OutDst);
var DstNavi = DstDoc.CreateNavigator();
var DstIterator = DstNavi.SelectChildren(XPathNodeType.All);
while (DstIterator.MoveNext())
Merge(DstIterator.Current.Clone(), SrcDoc, string.Empty);
if (string.IsNullOrWhiteSpace(SaveTo))
{
OutDst.SetLength(0);
DstDoc.Save(OutDst);
}
else
DstDoc.Save(SaveTo);
}
catch (Exception ex)
{
Result = string.Format(ErrorFormat, ex.ToString());
}
return Result;
}
private static string NodePath(string Parent, string Current)
{
var Result = string.Empty;
if (!string.IsNullOrWhiteSpace(Parent) && !string.IsNullOrWhiteSpace(Current))
Result = string.Format("{0}/{1}", Parent, Current);
else if (!string.IsNullOrWhiteSpace(Parent))
Result = Parent;
else if (!string.IsNullOrWhiteSpace(Current))
Result = Current;
return Result;
}
private static string NodeView(XPathNavigator Navi)
{
foreach (var Attr in KeyAttributes)
{
var Value = Navi.GetAttribute(Attr, string.Empty);
if (!string.IsNullOrWhiteSpace(Value))
return string.Format("{0}[@{1}='{2}']", Navi.Name, Attr, Value);
}
return Navi.Name;
}
private static void Merge(XPathNavigator DstNavi, XmlDocument SrcDoc, string Parent)
{
if (DstNavi.NodeType == XPathNodeType.Element)
{
var SrcElem = SrcDoc.SelectSingleNode(NodePath(Parent, NodeView(DstNavi)));
if (SrcElem != null)
{
if (DstNavi.MoveToFirstAttribute())
{
do
{
var SrcElemAttr = SrcElem.Attributes[DstNavi.LocalName];
if (SrcElemAttr != null)
DstNavi.SetValue(SrcElemAttr.Value);
}
while (DstNavi.MoveToNextAttribute());
DstNavi.MoveToParent();
}
}
}
else if (DstNavi.NodeType == XPathNodeType.Text)
{
var SrcElem = SrcDoc.SelectSingleNode(NodePath(Parent, NodeView(DstNavi)));
if (SrcElem != null)
DstNavi.SetValue(SrcElem.InnerText);
}
var Here = NodeView(DstNavi);
if (DstNavi.MoveToFirstChild())
{
do
{
Merge(DstNavi, SrcDoc, NodePath(Parent, Here));
}
while (DstNavi.MoveToNext());
DstNavi.MoveToParent();
}
else if (DstNavi.NodeType == XPathNodeType.Element)
{
var SrcElem = SrcDoc.SelectSingleNode(NodePath(Parent, Here));
if (SrcElem != null && !string.IsNullOrWhiteSpace(SrcElem.InnerXml))
foreach (XmlNode Child in SrcElem.ChildNodes)
DstNavi.AppendChild(Child.CloneNode(true).CreateNavigator());
}
}
}
}

View file

@ -144,6 +144,8 @@
<Compile Include="EnterpriseServer10.cs" />
<Compile Include="EnterpriseServer20.cs" />
<Compile Include="Internal\Adapter.cs" />
<Compile Include="Internal\BackupRestore.cs" />
<Compile Include="Internal\XmlDocumentMerge.cs" />
<Compile Include="Portal10.cs" />
<Compile Include="Portal20.cs" />
<Compile Include="Server10.cs" />

View file

@ -1153,12 +1153,11 @@ namespace WebsitePanel.Setup
user.IsPeer = false;
user.HtmlMail = true;
user.Username = loginName;
user.Password = password;
user.FirstName = firstName;
user.LastName = lastName;
user.Email = email;
int userId = ES.Services.Users.AddUser(user, false);
int userId = ES.Services.Users.AddUser(user, false, password);
if (userId > 0)
{
Log.WriteEnd("Added user account");

View file

@ -0,0 +1,55 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Text;
using Microsoft.Deployment.WindowsInstaller;
namespace WebsitePanel.WIXInstaller.Common
{
public class WiXLogFileListener : TraceListener
{
public const uint FileFlushSize = 4096;
public const string DefaultLogFile = "WSPInstallation.log.txt";
public static string LogFile { get; private set; }
private StringBuilder m_Ctx;
static WiXLogFileListener()
{
LogFile = Path.Combine(Path.GetTempPath() + DefaultLogFile);
}
public WiXLogFileListener(string LogFileName = DefaultLogFile)
: base("WiXLogFileListener")
{
m_Ctx = new StringBuilder();
}
~WiXLogFileListener()
{
Dispose(false);
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
Flush(true);
}
public override void Write(string Value)
{
m_Ctx.Append(Value);
Flush();
}
public override void WriteLine(string Value)
{
m_Ctx.AppendLine(Value);
Flush();
}
private void Flush(bool Force = false)
{
if(m_Ctx.Length >= FileFlushSize || Force)
{
using (var FileCtx = new StreamWriter(LogFile, true))
{
FileCtx.Write(m_Ctx.ToString());
}
m_Ctx.Clear();
}
}
}
}

View file

@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Configuration.Install;
using System.Data;
using System.Data.Sql;
@ -54,6 +55,144 @@ namespace WebsitePanel.WIXInstaller
#region CustomActions
[CustomAction]
public static ActionResult MaintenanceServer(Session session)
{
var Result = ActionResult.Success;
Log.WriteStart("MaintenanceServer");
Result = ProcessInstall(session, WiXInstallType.MaintenanceServer);
Log.WriteEnd("MaintenanceServer");
return Result;
}
[CustomAction]
public static ActionResult MaintenanceEServer(Session session)
{
var Result = ActionResult.Success;
Log.WriteStart("MaintenanceEServer");
Result = ProcessInstall(session, WiXInstallType.MaintenanceEnterpriseServer);
Log.WriteEnd("MaintenanceEServer");
return Result;
}
[CustomAction]
public static ActionResult MaintenancePortal(Session session)
{
var Result = ActionResult.Success;
Log.WriteStart("MaintenancePortal");
Result = ProcessInstall(session, WiXInstallType.MaintenancePortal);
Log.WriteEnd("MaintenancePortal");
return Result;
}
[CustomAction]
public static ActionResult PreFillSettings(Session session)
{
PopUpDebugger();
var Ctx = session;
Ctx.AttachToSetupLog();
Log.WriteStart("PreFillSettings");
var WSP = Ctx["WEBSITEPANELDIR"];
var CfgStr = string.Empty;
Func<string, string> GetCfg = (string CfgDir) =>
{
if (Directory.Exists(CfgDir))
{
var CfgFile = Path.Combine(CfgDir, BackupRestore.MainConfig);
if (File.Exists(CfgFile) && BackupRestore.HaveChild(CfgFile, "//components"))
return CfgFile;
else
{
var Names = new string[] { Global.Server.ComponentName, Global.EntServer.ComponentName, Global.WebPortal.ComponentName };
foreach (var Name in Names)
{
var Backup = BackupRestore.Find(CfgDir, Global.DefaultProductName, Name);
if (Backup != null && BackupRestore.HaveChild(Backup.BackupMainConfigFile, "//components"))
return CfgStr = Backup.BackupMainConfigFile;
}
}
}
return string.Empty;
};
Func<Session, string, string, bool> SetProperty = (Session CtxSession, string Prop, string Value) =>
{
if(!string.IsNullOrWhiteSpace(Value))
{
CtxSession[Prop] = Value;
return true;
}
return false;
};
CfgStr = GetCfg(WSP);
if(string.IsNullOrWhiteSpace(CfgStr))
{
var Drives = from Drive in DriveInfo.GetDrives() where Drive.DriveType == DriveType.Fixed select Drive;
foreach(var Drive in Drives)
{
var Dir = Path.Combine(Drive.RootDirectory.FullName, Global.DefaultProductName);
CfgStr = GetCfg(Dir);
if (!string.IsNullOrWhiteSpace(CfgStr))
break;
}
}
if (!string.IsNullOrWhiteSpace(CfgStr))
{
var EServerUrl = string.Empty;
AppConfig.LoadConfiguration(new ExeConfigurationFileMap { ExeConfigFilename = CfgStr });
var CtxVars = new SetupVariables();
CtxVars.ComponentId = WiXSetup.GetComponentID(CfgStr, Global.Server.ComponentCode);
if (!string.IsNullOrWhiteSpace(CtxVars.ComponentId))
{
AppConfig.LoadComponentSettings(CtxVars);
Ctx["COMPFOUND_SERVER"] = "1";
SetProperty(Ctx, "PI_SERVER_IP", CtxVars.WebSiteIP);
SetProperty(Ctx, "PI_SERVER_PORT", CtxVars.WebSitePort);
SetProperty(Ctx, "PI_SERVER_HOST", CtxVars.WebSiteDomain);
SetProperty(Ctx, "PI_SERVER_LOGIN", CtxVars.UserAccount);
SetProperty(Ctx, "PI_SERVER_PASSWORD", CtxVars.UserPassword);
SetProperty(Ctx, "PI_SERVER_PASSWORD_CONFIRM",CtxVars.UserPassword);
SetProperty(Ctx, "PI_SERVER_DOMAIN", CtxVars.UserDomain);
SetProperty(Ctx, "SERVER_ACCESS_PASSWORD", CtxVars.ServerPassword);
SetProperty(Ctx, "SERVER_ACCESS_PASSWORD_CONFIRM", CtxVars.ServerPassword);
}
CtxVars.ComponentId = WiXSetup.GetComponentID(CfgStr, Global.EntServer.ComponentCode);
if (!string.IsNullOrWhiteSpace(CtxVars.ComponentId))
{
AppConfig.LoadComponentSettings(CtxVars);
Ctx["COMPFOUND_ESERVER"] = "1";
SetProperty(Ctx, "PI_ESERVER_IP", CtxVars.WebSiteIP);
SetProperty(Ctx, "PI_ESERVER_PORT", CtxVars.WebSitePort);
SetProperty(Ctx, "PI_ESERVER_HOST", CtxVars.WebSiteDomain);
SetProperty(Ctx, "PI_ESERVER_LOGIN", CtxVars.UserAccount);
SetProperty(Ctx, "PI_ESERVER_PASSWORD", CtxVars.UserPassword);
SetProperty(Ctx, "PI_ESERVER_PASSWORD_CONFIRM", CtxVars.UserPassword);
SetProperty(Ctx, "PI_ESERVER_DOMAIN", CtxVars.UserDomain);
SetProperty(Ctx, "SERVERADMIN_PASSWORD", CtxVars.ServerAdminPassword);
SetProperty(Ctx, "SERVERADMIN_PASSWORD_CONFIRM", CtxVars.ServerAdminPassword);
EServerUrl = string.Format("http://{0}:{1}", CtxVars.WebSiteIP, CtxVars.WebSitePort);
}
CtxVars.ComponentId = WiXSetup.GetComponentID(CfgStr, Global.WebPortal.ComponentCode);
if (!string.IsNullOrWhiteSpace(CtxVars.ComponentId))
{
AppConfig.LoadComponentSettings(CtxVars);
Ctx["COMPFOUND_PORTAL"] = "1";
SetProperty(Ctx, "PI_PORTAL_IP", CtxVars.WebSiteIP);
SetProperty(Ctx, "PI_PORTAL_PORT", CtxVars.WebSitePort);
SetProperty(Ctx, "PI_PORTAL_HOST", CtxVars.WebSiteDomain);
SetProperty(Ctx, "PI_PORTAL_LOGIN", CtxVars.UserAccount);
SetProperty(Ctx, "PI_PORTAL_PASSWORD", CtxVars.UserPassword);
SetProperty(Ctx, "PI_PORTAL_PASSWORD_CONFIRM", CtxVars.UserPassword);
SetProperty(Ctx, "PI_PORTAL_DOMAIN", CtxVars.UserDomain);
if (!SetProperty(Ctx, "PI_ESERVER_URL", CtxVars.EnterpriseServerURL))
if (!SetProperty(Ctx, "PI_ESERVER_URL", EServerUrl))
SetProperty(Ctx, "PI_ESERVER_URL", Global.WebPortal.DefaultEntServURL);
}
}
TryApllyNewPassword(Ctx, "PI_SERVER_PASSWORD");
TryApllyNewPassword(Ctx, "PI_ESERVER_PASSWORD");
TryApllyNewPassword(Ctx, "PI_PORTAL_PASSWORD");
TryApllyNewPassword(Ctx, "SERVER_ACCESS_PASSWORD");
TryApllyNewPassword(Ctx, "SERVERADMIN_PASSWORD");
Log.WriteEnd("PreFillSettings");
return ActionResult.Success;
}
[CustomAction]
public static ActionResult InstallWebFeatures(Session session)
{
var Msg = string.Empty;
@ -406,6 +545,7 @@ namespace WebsitePanel.WIXInstaller
[CustomAction]
public static ActionResult FillIpListUI(Session session)
{
PopUpDebugger();
var Ctrls = new[]{ new ComboBoxCtrl(session, "PI_SERVER_IP"),
new ComboBoxCtrl(session, "PI_ESERVER_IP"),
new ComboBoxCtrl(session, "PI_PORTAL_IP") };
@ -717,18 +857,27 @@ namespace WebsitePanel.WIXInstaller
case WiXInstallType.RemoveServer:
Install = ServerSetup.Create(Ctx.CustomActionData, SetupActions.Uninstall);
break;
case WiXInstallType.MaintenanceServer:
Install = ServerSetup.Create(Ctx.CustomActionData, SetupActions.Setup);
break;
case WiXInstallType.InstallEnterpriseServer:
Install = EServerSetup.Create(Ctx.CustomActionData, SetupActions.Install);
break;
case WiXInstallType.RemoveEnterpriseServer:
Install = EServerSetup.Create(Ctx.CustomActionData, SetupActions.Uninstall);
break;
case WiXInstallType.MaintenanceEnterpriseServer:
Install = EServerSetup.Create(Ctx.CustomActionData, SetupActions.Setup);
break;
case WiXInstallType.InstallPortal:
Install = PortalSetup.Create(Ctx.CustomActionData, SetupActions.Install);
break;
case WiXInstallType.RemovePortal:
Install = PortalSetup.Create(Ctx.CustomActionData, SetupActions.Uninstall);
break;
case WiXInstallType.MaintenancePortal:
Install = PortalSetup.Create(Ctx.CustomActionData, SetupActions.Setup);
break;
default:
throw new NotImplementedException();
}
@ -751,6 +900,17 @@ namespace WebsitePanel.WIXInstaller
{
Debugger.Launch();
}
private static void TryApllyNewPassword(Session Ctx, string Id)
{
var Pass = Ctx[Id];
if (string.IsNullOrWhiteSpace(Pass))
{
Pass = Guid.NewGuid().ToString();
Ctx[Id] = Pass;
Ctx[Id + "_CONFIRM"] = Pass;
Log.WriteInfo("New password was applied to " + Id);
}
}
}
public static class SessionExtension
{
@ -758,9 +918,9 @@ namespace WebsitePanel.WIXInstaller
{
WiXSetup.InstallLogListener(new WiXLogListener(Ctx));
WiXSetup.InstallLogListener(new InMemoryStringLogListener("WIX CA IN MEMORY"));
WiXSetup.InstallLogListener(new WiXLogFileListener());
}
}
internal enum WiXInstallType: byte
{
InstallServer,
@ -769,7 +929,8 @@ namespace WebsitePanel.WIXInstaller
RemoveServer,
RemoveEnterpriseServer,
RemovePortal,
RemoveUpdate,
RestoreUpdate
MaintenanceServer,
MaintenanceEnterpriseServer,
MaintenancePortal
}
}

View file

@ -47,6 +47,7 @@
<HintPath>..\..\Lib\Microsoft.Web.Administration.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
@ -63,6 +64,7 @@
<Compile Include="Common\Tool.cs" />
<Compile Include="Common\Prop.cs" />
<Compile Include="Common\Util\IListCtrl.cs" />
<Compile Include="Common\WiXLogFileListener.cs" />
<Compile Include="Common\WiXLogListener.cs" />
<Compile Include="Common\YesNo.cs" />
<Compile Include="CustomAction.cs" />

View file

@ -8208,11 +8208,13 @@ AS
INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID
WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 3)
ELSE IF @QuotaID = 558 BEGIN -- RAM of VPS2012
DECLARE @Result1 int = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
DECLARE @Result1 int
SET @Result1 = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
WHERE SIP.PropertyName = 'RamSize' AND PT.ParentPackageID = @PackageID)
DECLARE @Result2 int = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
DECLARE @Result2 int
SET @Result2 = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
INNER JOIN ServiceItemProperties AS SIP2 ON
SIP2.ItemID = SI.ItemID AND SIP2.PropertyName = 'DynamicMemory.Enabled' AND SIP2.PropertyValue = 'True'
@ -9885,8 +9887,6 @@ IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [Settin
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordExpirationLetter', N'HtmlBody', @UserPasswordExpirationLetterHtmlBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordExpirationLetterHtmlBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordExpirationLetter' AND [PropertyName]= N'HtmlBody'
GO
@ -9902,7 +9902,7 @@ END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordExpirationLetter' AND [PropertyName]= N'LogoUrl' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordExpirationLetter', N'LogoUrl', N'https://controlpanel.virtuworks.net/App_Themes/Default/Images/logo.png')
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordExpirationLetter', N'LogoUrl', N'')
END
GO
@ -9929,8 +9929,6 @@ IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [Settin
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordExpirationLetter', N'TextBody', @UserPasswordExpirationLetterTextBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordExpirationLetterTextBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordExpirationLetter' AND [PropertyName]= N'TextBody'
GO
@ -9998,8 +9996,6 @@ IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [Settin
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'HtmlBody', @UserPasswordResetLetterHtmlBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetLetterHtmlBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'HtmlBody'
GO
@ -10015,7 +10011,7 @@ END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'LogoUrl' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'LogoUrl', N'https://controlpanel.virtuworks.net/App_Themes/Default/Images/logo.png')
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'LogoUrl', N'')
END
GO
@ -10042,8 +10038,6 @@ IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [Settin
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'TextBody', @UserPasswordResetLetterTextBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetLetterTextBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'TextBody'
GO
@ -10059,8 +10053,6 @@ IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [Settin
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'PasswordResetLinkSmsBody', @UserPasswordResetSMSBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetSMSBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'PasswordResetLinkSmsBody'
GO
-- USER PASSWORD RESET EMAIL PINCODE TEMPLATE
@ -10124,8 +10116,6 @@ IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [Settin
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'HtmlBody', @UserPasswordResetPincodeLetterHtmlBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetPincodeLetterHtmlBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'HtmlBody'
GO
@ -10141,7 +10131,7 @@ END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'LogoUrl' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'LogoUrl', N'https://controlpanel.virtuworks.net/App_Themes/Default/Images/logo.png')
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'LogoUrl', N'')
END
GO
@ -10168,8 +10158,6 @@ IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [Settin
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'TextBody', @UserPasswordResetPincodeLetterTextBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetPincodeLetterTextBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'TextBody'
GO
DECLARE @UserPasswordPincodeSMSBody nvarchar(2500)
@ -10182,17 +10170,135 @@ IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [Settin
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'PasswordResetPincodeSmsBody', @UserPasswordPincodeSMSBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordPincodeSMSBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'PasswordResetPincodeSmsBody'
GO
-- USER PASSWORD REQUEST EMAIL TEMPLATE
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'From' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'From', N'support@HostingCompany.com')
END
GO
DECLARE @OrganizationUserPasswordRequestLetterHtmlBody nvarchar(2500)
Set @OrganizationUserPasswordRequestLetterHtmlBody = N'<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Password request notification</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">
<div class="Header">
<img src="#logoUrl#">
</div>
<h1>Password request notification</h1>
<ad:if test="#user#">
<p>
Hello #user.FirstName#,
</p>
</ad:if>
<p>
Your account have been created. In order to create a password for your account, please follow next link:
</p>
<a href="#passwordResetLink#" target="_blank">#passwordResetLink#</a>
<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>
</div>
</body>';
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'HtmlBody' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'HtmlBody', @OrganizationUserPasswordRequestLetterHtmlBody)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'Priority' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'Priority', N'Normal')
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'Subject' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'Subject', N'Password request notification')
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'LogoUrl' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'LogoUrl', N'')
END
GO
DECLARE @OrganizationUserPasswordRequestLetterTextBody nvarchar(2500)
Set @OrganizationUserPasswordRequestLetterTextBody = N'=========================================
Password request notification
=========================================
<ad:if test="#user#">
Hello #user.FirstName#,
</ad:if>
Your account have been created. In order to create a password for your account, please follow next link:
#passwordResetLink#
If you have any questions regarding your hosting account, feel free to contact our support department at any time.
Best regards'
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'TextBody' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'TextBody', @OrganizationUserPasswordRequestLetterTextBody)
END
GO
DECLARE @OrganizationUserPasswordRequestLetterSMSBody nvarchar(2500)
Set @OrganizationUserPasswordRequestLetterSMSBody = N'
User have been created. Password request url:
#passwordResetLink#'
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'OrganizationUserPasswordRequestLetter' AND [PropertyName]= N'SMSBody' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'OrganizationUserPasswordRequestLetter', N'SMSBody', @OrganizationUserPasswordRequestLetterSMSBody)
END
GO
-- Exchange setup EMAIL TEMPLATE
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'ExchangeMailboxSetupLetter' AND [PropertyName]= N'From' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'ExchangeMailboxSetupLetter', N'From', N'orders@virtuworks.com')
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'ExchangeMailboxSetupLetter', N'From', N'')
END
GO
@ -10228,7 +10334,7 @@ Set @ExchangeMailboxSetupLetterHtmlBody = N'<html xmlns="http://www.w3.org/1999/
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="text-align: left; padding: 0px 0px 2px 0px;"><a href="http://www.virtuworks.com"><img src="https://controlpanel.virtuworks.net/vw-email-logo.gif" border="0" alt="VirtuWorks: Run Your Business In The Cloud" /></a></td>
<td style="text-align: left; padding: 0px 0px 2px 0px;"><a href=""><img src="" border="0" alt="" /></a></td>
</tr>
</tbody>
</table>
@ -10243,11 +10349,11 @@ Set @ExchangeMailboxSetupLetterHtmlBody = N'<html xmlns="http://www.w3.org/1999/
<table class="menu-bar" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="text-align: center;" width="20%"><a style="color: ##ffffff; text-transform: uppercase; font-size: 9px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-decoration: none;" href="http://www.virtuworks.com">Visit VirtuWorks.com</a></td>
<td style="text-align: center;" width="20%"><a style="color: ##ffffff; text-transform: uppercase; font-size: 9px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-decoration: none;" href="https://portal.virtuworks.net/whmcs/clientarea.php">Account Management</a></td>
<td style="text-align: center;" width="20%"><a style="color: ##ffffff; text-transform: uppercase; font-size: 9px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-decoration: none;" href="https://controlpanel.virtuworks.net">Control Panel</a></td>
<td style="text-align: center;" width="20%"><a style="color: ##ffffff; text-transform: uppercase; font-size: 9px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-decoration: none;" href="http://www.virtuworks.com/support">Support</a></td>
<td style="text-align: center;" width="20%"><a style="color: ##ffffff; text-transform: uppercase; font-size: 9px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-decoration: none;" href="http://www.virtuworks.com/company/contact-us.aspx">Contact Us</a></td>
<td style="text-align: center;" width="20%"><a style="color: ##ffffff; text-transform: uppercase; font-size: 9px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-decoration: none;" href=""</a></td>
<td style="text-align: center;" width="20%"><a style="color: ##ffffff; text-transform: uppercase; font-size: 9px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-decoration: none;" href=""></a></td>
<td style="text-align: center;" width="20%"><a style="color: ##ffffff; text-transform: uppercase; font-size: 9px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-decoration: none;" href=""></a></td>
<td style="text-align: center;" width="20%"><a style="color: ##ffffff; text-transform: uppercase; font-size: 9px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-decoration: none;" href=""></a></td>
<td style="text-align: center;" width="20%"><a style="color: ##ffffff; text-transform: uppercase; font-size: 9px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-decoration: none;" href=""></a></td>
</tr>
</tbody>
</table>
@ -10279,7 +10385,7 @@ Set @ExchangeMailboxSetupLetterHtmlBody = N'<html xmlns="http://www.w3.org/1999/
Hello #Account.DisplayName#,
</p>
<p>
Thanks for choosing VirtuWorks as your Exchange hosting provider.
Thanks for choosing as your Exchange hosting provider.
</p>
</ad:if>
<ad:if test="#not(PMM)#">
@ -10318,15 +10424,15 @@ Set @ExchangeMailboxSetupLetterHtmlBody = N'<html xmlns="http://www.w3.org/1999/
<h1>
Webmail (OWA, Outlook Web Access)</h1>
<p>
<a href="https://mail.virtuworks.net/owa" target="_blank">https://mail.virtuworks.net/owa</a>
<a href="" target="_blank"></a>
</p>
<h1>
Outlook (Windows Clients)</h1>
<p>
To configure Outlook 2013 to work with the VirtuWorks servers, please reference:
To configure Outlook 2013 to work with the servers, please reference:
</p>
<p>
<a href="http://www.virtuworks.com/how-to-configure-my-outlook-2010-client-to-work-with-my-velum-hosted-exchange-account/" target="_blank">http://www.virtuworks.com/how-to-configure-my-outlook-2010-client-to-work-with-my-velum-hosted-exchange-account/</a>
<a href="" target="_blank"></a>
</p>
<p>
If you need to download and install the Outlook client:</p>
@ -10337,16 +10443,16 @@ Set @ExchangeMailboxSetupLetterHtmlBody = N'<html xmlns="http://www.w3.org/1999/
<tr>
<td class="Label">
Download URL:</td>
<td><a href="http://www.virtuworks.net/saas-downloads/Outlook-2013-32bit.zip">Outlook 2013 - 32bit</a></td>
<td><a href=""></a></td>
</tr>
<tr>
<td class="Label"></td>
<td><a href="http://www.virtuworks.net/saas-downloads/Outlook-2013-64bit.zip">Outlook 2013 - 64bit</a></td>
<td><a href=""></a></td>
</tr>
<tr>
<td class="Label">
KEY:</td>
<td>HPN4P-JKC89-VCCWD-24CD2-9P8H7</td>
<td></td>
</tr>
</table>
@ -10373,13 +10479,13 @@ Set @ExchangeMailboxSetupLetterHtmlBody = N'<html xmlns="http://www.w3.org/1999/
<h1>Password Changes</h1>
<p>
Passwords can be changed at any time using Webmail or the <a href="https://controlpanel.virtuworks.net" target="_blank">Control Panel</a>.</p>
Passwords can be changed at any time using Webmail or the <a href="" target="_blank">Control Panel</a>.</p>
<h1>Control Panel</h1>
<p>
If you need to change the details of your account, you can easily do this using <a href="https://controlpanel.virtuworks.net" target="_blank">Control Panel</a>.</p>
If you need to change the details of your account, you can easily do this using <a href="" target="_blank">Control Panel</a>.</p>
<h1>Support</h1>
<p>
You have 2 options, email <a href="mailto:help@virtuworks.com">help@virtuworks.com</a> or use the web interface at <a href="http://www.virtuworks.com/support">http://www.virtuworks.com/support</a></p>
You have 2 options, email <a href="mailto:"></a> or use the web interface at <a href=""></a></p>
</div>
<!-- End Content -->
@ -10407,9 +10513,9 @@ Set @ExchangeMailboxSetupLetterHtmlBody = N'<html xmlns="http://www.w3.org/1999/
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 9px; text-align: left; color: ##1666af; vertical-align: top;" width="33%"><a style="font-weight: bold; text-transform: uppercase; text-decoration: underline; color: ##1666af;" href="http://www.virtuworks.com">Visit VirtuWorks.com </a><br />Learn more about the services VirtuWorks can provide to improve your business.</td>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 9px; text-align: left; color: ##1666af; padding: 0px 10px 0px 10px; vertical-align: top;" width="34%"><a style="font-weight: bold; text-transform: uppercase; text-decoration: underline; color: ##1666af;" href="http://www.virtuworks.com/privacy-policy">Privacy Policy</a><br />VirtuWorks follows strict guidelines in protecting your privacy. Learn about our <a style="font-weight: bold; text-decoration: underline; color: ##1666af;" href="http://www.virtuworks.com/privacy-policy">Privacy Policy</a>.</td>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 9px; text-align: left; color: ##1666af; vertical-align: top;" width="33%"><a style="font-weight: bold; text-transform: uppercase; text-decoration: underline; color: ##1666af;" href="http://www.virtuworks.com/contact/">Contact Us</a><br />Questions? For more information, <a style="font-weight: bold; text-decoration: underline; color: ##1666af;" href="http://www.virtuworks.com/contact/">contact us</a>.</td>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 9px; text-align: left; color: ##1666af; vertical-align: top;" width="33%"><a style="font-weight: bold; text-transform: uppercase; text-decoration: underline; color: ##1666af;" href=""></a><br />Learn more about the services can provide to improve your business.</td>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 9px; text-align: left; color: ##1666af; padding: 0px 10px 0px 10px; vertical-align: top;" width="34%"><a style="font-weight: bold; text-transform: uppercase; text-decoration: underline; color: ##1666af;" href="">Privacy Policy</a><br /> follows strict guidelines in protecting your privacy. Learn about our <a style="font-weight: bold; text-decoration: underline; color: ##1666af;" href="">Privacy Policy</a>.</td>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 9px; text-align: left; color: ##1666af; vertical-align: top;" width="33%"><a style="font-weight: bold; text-transform: uppercase; text-decoration: underline; color: ##1666af;" href="">Contact Us</a><br />Questions? For more information, <a style="font-weight: bold; text-decoration: underline; color: ##1666af;" href="">contact us</a>.</td>
</tr>
</tbody>
</table>
@ -10448,7 +10554,7 @@ END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'ExchangeMailboxSetupLetter' AND [PropertyName]= N'Subject' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'ExchangeMailboxSetupLetter', N'Subject', N'Virtuworks Hosted Exchange Mailbox Setup')
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'ExchangeMailboxSetupLetter', N'Subject', N' Hosted Exchange Mailbox Setup')
END
GO
@ -10458,7 +10564,7 @@ DECLARE @ExchangeMailboxSetupLetterTextBody nvarchar(2500)
Set @ExchangeMailboxSetupLetterTextBody = N'<ad:if test="#Email#">
Hello #Account.DisplayName#,
Thanks for choosing VirtuWorks as your Exchange hosting provider.
Thanks for choosing as your Exchange hosting provider.
</ad:if>
<ad:if test="#not(PMM)#">
User Accounts
@ -10484,22 +10590,21 @@ In order for us to accept mail for your domain, you will need to point your MX r
Webmail (OWA, Outlook Web Access)
=================================
https://mail.virtuworks.net/owa
=================================
Outlook (Windows Clients)
=================================
To configure Outlook 2010 to work with VirtuWorks servers, please reference:
To configure Outlook 2010 to work with servers, please reference:
https://portal.virtuworks.net/whmcs/knowledgebase.php?action=displayarticle&id=2
If you need to download and install the Outlook 2010 client:
Outlook 2010 Download URL:
32 Bit - http://www.virtuworks.net/downloads/Outlook2010-32bit.zip
64 Bit - http://www.virtuworks.net/downloads/Outlook2010-64bit.zip
KEY: HXGFV-DY3HM-4W2BQ-3R7KQ-K8P49
KEY:
=================================
ActiveSync, iPhone, iPad
@ -10514,21 +10619,21 @@ Your username: #SamUsername#
Password Changes
=================================
Passwords can be changed at any time using Webmail or the Control Panel (https://controlpanel.virtuworks.net).
Passwords can be changed at any time using Webmail or the Control Panel
=================================
Control Panel
=================================
If you need to change the details of your account, you can easily do this using the Control Panel (https://controlpanel.virtuworks.net).
If you need to change the details of your account, you can easily do this using the Control Panel
=================================
Support
=================================
You have 2 options, email help@virtuworks.com or use the web interface at http://www.virtuworks.com/contact/'
You have 2 options, email or use the web interface at '
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'ExchangeMailboxSetupLetter' AND [PropertyName]= N'TextBody' )
BEGIN

View file

@ -8197,11 +8197,13 @@ AS
INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID
WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 3)
ELSE IF @QuotaID = 558 BEGIN -- RAM of VPS2012
DECLARE @Result1 int = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
DECLARE @Result1 int
SET @Result1 = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
WHERE SIP.PropertyName = 'RamSize' AND PT.ParentPackageID = @PackageID)
DECLARE @Result2 int = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
DECLARE @Result2 int
SET @Result2 = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
INNER JOIN ServiceItemProperties AS SIP2 ON
SIP2.ItemID = SI.ItemID AND SIP2.PropertyName = 'DynamicMemory.Enabled' AND SIP2.PropertyValue = 'True'
@ -8910,6 +8912,12 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDe
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaID] = '572')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (572, 33, 20, N'VPS2012.ReplicationEnabled', N'Allow user to Replication', 1, 0, NULL, NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [ProviderName] = 'HyperV2012R2')
BEGIN
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (350, 33, N'HyperV2012R2', N'Microsoft Hyper-V 2012 R2', N'WebsitePanel.Providers.Virtualization.HyperV2012R2, WebsitePanel.Providers.Virtualization.HyperV2012R2', N'HyperV2012R2', 1)
@ -9590,6 +9598,13 @@ IF EXISTS (SELECT * FROM ResourceGroups WHERE GroupName = 'SharePoint')
BEGIN
DECLARE @group_id INT
SELECT @group_id = GroupId FROM ResourceGroups WHERE GroupName = 'SharePoint'
DELETE FROM PackageQuotas WHERE QuotaID IN (SELECT QuotaID FROM Quotas WHERE GroupID = @group_id)
DELETE FROM HostingPlanQuotas WHERE QuotaID IN (SELECT QuotaID FROM Quotas WHERE GroupID = @group_id)
DELETE FROM HostingPlanResources WHERE GroupId = @group_id
DELETE FROM PackagesBandwidth WHERE GroupId = @group_id
DELETE FROM PackagesDiskspace WHERE GroupId = @group_id
DELETE FROM PackageResources WHERE GroupId = @group_id
DELETE FROM ResourceGroupDnsRecords WHERE GroupId = @group_id
DELETE FROM Providers WHERE GroupID = @group_id
DELETE FROM Quotas WHERE GroupID = @group_id
DELETE FROM VirtualGroups WHERE GroupID = @group_id
@ -10020,6 +10035,145 @@ UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetLetterTextBo
GO
DECLARE @UserPasswordResetSMSBody nvarchar(2500)
Set @UserPasswordResetSMSBody = N'Password reset link:
#passwordResetLink#
'
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'PasswordResetLinkSmsBody' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'PasswordResetLinkSmsBody', @UserPasswordResetSMSBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetSMSBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'PasswordResetLinkSmsBody'
GO
-- USER PASSWORD RESET EMAIL PINCODE TEMPLATE
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'From' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'From', N'support@HostingCompany.com')
END
GO
DECLARE @UserPasswordResetPincodeLetterHtmlBody nvarchar(2500)
Set @UserPasswordResetPincodeLetterHtmlBody = N'<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Password reset notification</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">
<div class="Header">
<img src="#logoUrl#">
</div>
<h1>Password reset notification</h1>
<ad:if test="#user#">
<p>
Hello #user.FirstName#,
</p>
</ad:if>
<p>
We received a request to reset the password for your account. Your password reset pincode:
</p>
#passwordResetPincode#
<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>
</div>
</body>';
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'HtmlBody' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'HtmlBody', @UserPasswordResetPincodeLetterHtmlBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetPincodeLetterHtmlBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'HtmlBody'
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'Priority' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'Priority', N'Normal')
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'Subject' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'Subject', N'Password reset notification')
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'LogoUrl' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'LogoUrl', N'https://controlpanel.virtuworks.net/App_Themes/Default/Images/logo.png')
END
GO
DECLARE @UserPasswordResetPincodeLetterTextBody nvarchar(2500)
Set @UserPasswordResetPincodeLetterTextBody = N'=========================================
Password reset notification
=========================================
<ad:if test="#user#">
Hello #user.FirstName#,
</ad:if>
We received a request to reset the password for your account. Your password reset pincode:
#passwordResetPincode#
If you have any questions regarding your hosting account, feel free to contact our support department at any time.
Best regards'
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'TextBody' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'TextBody', @UserPasswordResetPincodeLetterTextBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetPincodeLetterTextBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'TextBody'
GO
DECLARE @UserPasswordPincodeSMSBody nvarchar(2500)
Set @UserPasswordPincodeSMSBody = N'
Your password reset pincode:
#passwordResetPincode#'
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'PasswordResetPincodeSmsBody' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'PasswordResetPincodeSmsBody', @UserPasswordPincodeSMSBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordPincodeSMSBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'PasswordResetPincodeSmsBody'
GO
-- Exchange setup EMAIL TEMPLATE
@ -10289,79 +10443,79 @@ GO
DECLARE @ExchangeMailboxSetupLetterTextBody nvarchar(2500)
Set @ExchangeMailboxSetupLetterTextBody = N'<ad:if test="#Email#">
Hello #Account.DisplayName#,
Thanks for choosing VirtuWorks as your Exchange hosting provider.
</ad:if>
<ad:if test="#not(PMM)#">
User Accounts
The following user accounts have been created for you.
Username: #Account.UserPrincipalName#
E-mail: #Account.PrimaryEmailAddress#
<ad:if test="#PswResetUrl#">
Password Reset Url: #PswResetUrl#
</ad:if>
</ad:if>
=================================
DNS
=================================
In order for us to accept mail for your domain, you will need to point your MX records to:
<ad:foreach collection="#SmtpServers#" var="SmtpServer" index="i">#SmtpServer#</ad:foreach>
=================================
Webmail (OWA, Outlook Web Access)
=================================
https://mail.virtuworks.net/owa
=================================
Outlook (Windows Clients)
=================================
To configure Outlook 2010 to work with VirtuWorks servers, please reference:
https://portal.virtuworks.net/whmcs/knowledgebase.php?action=displayarticle&id=2
If you need to download and install the Outlook 2010 client:
Outlook 2010 Download URL:
32 Bit - http://www.virtuworks.net/downloads/Outlook2010-32bit.zip
64 Bit - http://www.virtuworks.net/downloads/Outlook2010-64bit.zip
KEY: HXGFV-DY3HM-4W2BQ-3R7KQ-K8P49
=================================
ActiveSync, iPhone, iPad
=================================
Server: #ActiveSyncServer#
Domain: #SamDomain#
SSL: must be checked
Your username: #SamUsername#
=================================
Password Changes
=================================
Passwords can be changed at any time using Webmail or the Control Panel (https://controlpanel.virtuworks.net).
=================================
Control Panel
=================================
If you need to change the details of your account, you can easily do this using the Control Panel (https://controlpanel.virtuworks.net).
=================================
Support
=================================
Set @ExchangeMailboxSetupLetterTextBody = N'<ad:if test="#Email#">
Hello #Account.DisplayName#,
Thanks for choosing VirtuWorks as your Exchange hosting provider.
</ad:if>
<ad:if test="#not(PMM)#">
User Accounts
The following user accounts have been created for you.
Username: #Account.UserPrincipalName#
E-mail: #Account.PrimaryEmailAddress#
<ad:if test="#PswResetUrl#">
Password Reset Url: #PswResetUrl#
</ad:if>
</ad:if>
=================================
DNS
=================================
In order for us to accept mail for your domain, you will need to point your MX records to:
<ad:foreach collection="#SmtpServers#" var="SmtpServer" index="i">#SmtpServer#</ad:foreach>
=================================
Webmail (OWA, Outlook Web Access)
=================================
https://mail.virtuworks.net/owa
=================================
Outlook (Windows Clients)
=================================
To configure Outlook 2010 to work with VirtuWorks servers, please reference:
https://portal.virtuworks.net/whmcs/knowledgebase.php?action=displayarticle&id=2
If you need to download and install the Outlook 2010 client:
Outlook 2010 Download URL:
32 Bit - http://www.virtuworks.net/downloads/Outlook2010-32bit.zip
64 Bit - http://www.virtuworks.net/downloads/Outlook2010-64bit.zip
KEY: HXGFV-DY3HM-4W2BQ-3R7KQ-K8P49
=================================
ActiveSync, iPhone, iPad
=================================
Server: #ActiveSyncServer#
Domain: #SamDomain#
SSL: must be checked
Your username: #SamUsername#
=================================
Password Changes
=================================
Passwords can be changed at any time using Webmail or the Control Panel (https://controlpanel.virtuworks.net).
=================================
Control Panel
=================================
If you need to change the details of your account, you can easily do this using the Control Panel (https://controlpanel.virtuworks.net).
=================================
Support
=================================
You have 2 options, email help@virtuworks.com or use the web interface at http://www.virtuworks.com/contact/'
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'ExchangeMailboxSetupLetter' AND [PropertyName]= N'TextBody' )
@ -10674,3 +10828,265 @@ SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetSearchObject')
DROP PROCEDURE GetSearchObject
GO
CREATE PROCEDURE [dbo].[GetSearchObject]
(
@ActorID int,
@UserID int,
@FilterColumn nvarchar(50) = '',
@FilterValue nvarchar(50) = '',
@StatusID int,
@RoleID int,
@SortColumn nvarchar(50),
@StartRow int,
@MaximumRows int = 0,
@Recursive bit,
@ColType nvarchar(50) = '',
@FullType nvarchar(50) = '',
@OnlyFind bit
)
AS
IF dbo.CheckActorUserRights(@ActorID, @UserID) = 0
RAISERROR('You are not allowed to access this account', 16, 1)
DECLARE @columnUsername nvarchar(20)
SET @columnUsername = 'Username'
DECLARE @columnEmail nvarchar(20)
SET @columnEmail = 'Email'
DECLARE @columnCompanyName nvarchar(20)
SET @columnCompanyName = 'CompanyName'
DECLARE @columnFullName nvarchar(20)
SET @columnFullName = 'FullName'
DECLARE @curUsers cursor
DECLARE @curSpace cursor
DECLARE @sqlSpace nvarchar(2000)
DECLARE @sqlUsers nvarchar(2000)
DECLARE @sqlReturn nvarchar(4000)
IF @FilterColumn = '' AND @FilterValue <> ''
SET @FilterColumn = 'TextSearch'
SET @sqlUsers = '
DECLARE @HasUserRights bit
SET @HasUserRights = dbo.CheckActorUserRights(@ActorID, @UserID)
DECLARE @Users TABLE
(
ItemPosition int IDENTITY(0,1),
UserID int
)
INSERT INTO @Users (UserID)
SELECT '
IF @OnlyFind = 1
SET @sqlUsers = @sqlUsers + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
SET @sqlUsers = @sqlUsers + 'U.UserID
FROM UsersDetailed AS U
WHERE
U.UserID <> @UserID AND U.IsPeer = 0 AND
(
(@Recursive = 0 AND OwnerID = @UserID) OR
(@Recursive = 1 AND dbo.CheckUserParent(@UserID, U.UserID) = 1)
)
AND ((@StatusID = 0) OR (@StatusID > 0 AND U.StatusID = @StatusID))
AND ((@RoleID = 0) OR (@RoleID > 0 AND U.RoleID = @RoleID))
AND @HasUserRights = 1
SET @curValue = cursor local for
SELECT
U.ItemID,
U.TextSearch,
U.ColumnType,
''Users'' as FullType,
0 as PackageID,
0 as AccountID
FROM @Users AS TU
INNER JOIN
(
SELECT ItemID, TextSearch, ColumnType
FROM(
SELECT U0.UserID as ItemID, U0.Username as TextSearch, @columnUsername as ColumnType
FROM dbo.Users AS U0
UNION
SELECT U1.UserID as ItemID, U1.Email as TextSearch, @columnEmail as ColumnType
FROM dbo.Users AS U1
UNION
SELECT U2.UserID as ItemID, U2.CompanyName as TextSearch, @columnCompanyName as ColumnType
FROM dbo.Users AS U2
UNION
SELECT U3.UserID as ItemID, U3.FirstName + '' '' + U3.LastName as TextSearch, @columnFullName as ColumnType
FROM dbo.Users AS U3) as U
WHERE TextSearch<>'' '' OR ISNULL(TextSearch, 0) > 0
)
AS U ON TU.UserID = U.ItemID'
SET @sqlUsers = @sqlUsers + ' open @curValue'
exec sp_executesql @sqlUsers, N'@UserID int, @FilterValue nvarchar(50), @ActorID int, @Recursive bit, @StatusID int, @RoleID int, @columnUsername nvarchar(20), @columnEmail nvarchar(20), @columnCompanyName nvarchar(20), @columnFullName nvarchar(20), @curValue cursor output',
@UserID, @FilterValue, @ActorID, @Recursive, @StatusID, @RoleID, @columnUsername, @columnEmail, @columnCompanyName, @columnFullName, @curValue=@curUsers output
SET @sqlSpace = '
DECLARE @ItemsService TABLE
(
ItemID int
)
INSERT INTO @ItemsService (ItemID)
SELECT '
IF @OnlyFind = 1
SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' '
SET @sqlSpace = @sqlSpace + 'SI.ItemID
FROM ServiceItems AS SI
INNER JOIN Packages AS P ON P.PackageID = SI.PackageID
INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID
WHERE
dbo.CheckUserParent(@UserID, P.UserID) = 1
DECLARE @ItemsDomain TABLE
(
ItemID int
)
INSERT INTO @ItemsDomain (ItemID)
SELECT
D.DomainID
FROM Domains AS D
INNER JOIN Packages AS P ON P.PackageID = D.PackageID
INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID
WHERE
dbo.CheckUserParent(@UserID, P.UserID) = 1
SET @curValue = cursor local for
SELECT
SI.ItemID as ItemID,
SI.ItemName as TextSearch,
STYPE.DisplayName as ColumnType,
STYPE.DisplayName as FullType,
SI.PackageID as PackageID,
0 as AccountID
FROM @ItemsService AS I
INNER JOIN ServiceItems AS SI ON I.ItemID = SI.ItemID
INNER JOIN ServiceItemTypes AS STYPE ON SI.ItemTypeID = STYPE.ItemTypeID
WHERE STYPE.Searchable = 1
UNION
SELECT
D.DomainID AS ItemID,
D.DomainName as TextSearch,
''Domain'' as ColumnType,
''Domain'' as FullType,
D.PackageID as PackageID,
0 as AccountID
FROM @ItemsDomain AS I
INNER JOIN Domains AS D ON I.ItemID = D.DomainID
WHERE D.IsDomainPointer=0
UNION
SELECT
EA.ItemID AS ItemID,
EA.AccountName as TextSearch,
''ExchangeAccount'' as ColumnType,
''ExchangeAccount'' as FullType,
SI2.PackageID as PackageID,
EA.AccountID as AccountID
FROM @ItemsService AS I2
INNER JOIN ServiceItems AS SI2 ON I2.ItemID = SI2.ItemID
INNER JOIN ExchangeAccounts AS EA ON I2.ItemID = EA.ItemID
';
SET @sqlSpace = @sqlSpace + ' open @curValue'
exec sp_executesql @sqlSpace, N'@UserID int, @FilterValue nvarchar(50), @ActorID int, @curValue cursor output',
@UserID, @FilterValue, @ActorID, @curValue=@curSpace output
SET @sqlReturn = '
DECLARE @ItemID int
DECLARE @TextSearch nvarchar(500)
DECLARE @ColumnType nvarchar(50)
DECLARE @FullType nvarchar(50)
DECLARE @PackageID int
DECLARE @AccountID int
DECLARE @EndRow int
SET @EndRow = @StartRow + @MaximumRows
DECLARE @ItemsAll TABLE
(
ItemPosition int IDENTITY(1,1),
ItemID int,
TextSearch nvarchar(500),
ColumnType nvarchar(50),
FullType nvarchar(50),
PackageID int,
AccountID int
)
FETCH NEXT FROM @curSpaceValue INTO @ItemID, @TextSearch, @ColumnType, @FullType, @PackageID, @AccountID
WHILE @@FETCH_STATUS = 0
BEGIN
INSERT INTO @ItemsAll(ItemID, TextSearch, ColumnType, FullType, PackageID, AccountID)
VALUES(@ItemID, @TextSearch, @ColumnType, @FullType, @PackageID, @AccountID)
FETCH NEXT FROM @curSpaceValue INTO @ItemID, @TextSearch, @ColumnType, @FullType, @PackageID, @AccountID
END
FETCH NEXT FROM @curUsersValue INTO @ItemID, @TextSearch, @ColumnType, @FullType, @PackageID, @AccountID
WHILE @@FETCH_STATUS = 0
BEGIN
INSERT INTO @ItemsAll(ItemID, TextSearch, ColumnType, FullType, PackageID, AccountID)
VALUES(@ItemID, @TextSearch, @ColumnType, @FullType, @PackageID, @AccountID)
FETCH NEXT FROM @curUsersValue INTO @ItemID, @TextSearch, @ColumnType, @FullType, @PackageID, @AccountID
END
DECLARE @ItemsReturn TABLE
(
ItemPosition int IDENTITY(1,1),
ItemID int,
TextSearch nvarchar(500),
ColumnType nvarchar(50),
FullType nvarchar(50),
PackageID int,
AccountID int
)
INSERT INTO @ItemsReturn(ItemID, TextSearch, ColumnType, FullType, PackageID, AccountID)
SELECT ItemID, TextSearch, ColumnType, FullType, PackageID, AccountID
FROM @ItemsAll AS IA WHERE (1 = 1) '
IF @ColType <> ''
SET @sqlReturn = @sqlReturn + ' AND IA.ColumnType in ( ' + @ColType + ' ) ';
IF @FullType <> ''
SET @sqlReturn = @sqlReturn + ' AND IA.FullType = ''' + @FullType + '''';
IF @FilterValue <> ''
SET @sqlReturn = @sqlReturn + ' AND IA.' + @FilterColumn + ' LIKE @FilterValue '
IF @SortColumn <> '' AND @SortColumn IS NOT NULL
SET @sqlReturn = @sqlReturn + ' ORDER BY ' + @SortColumn + ' '
SET @sqlReturn = @sqlReturn + '
SELECT COUNT(ItemID) FROM @ItemsReturn;
SELECT DISTINCT(ColumnType) FROM @ItemsReturn WHERE (1 = 1) ';
IF @FullType <> ''
SET @sqlReturn = @sqlReturn + ' AND FullType = ''' + @FullType + '''';
SET @sqlReturn = @sqlReturn + '; ';
SET @sqlReturn = @sqlReturn + '
SELECT ItemPosition, ItemID, TextSearch, ColumnType, FullType, PackageID, AccountID
FROM @ItemsReturn AS IR WHERE (1 = 1)
'
IF @MaximumRows > 0
SET @sqlReturn = @sqlReturn + ' AND IR.ItemPosition BETWEEN @StartRow AND @EndRow';
exec sp_executesql @sqlReturn, N'@StartRow int, @MaximumRows int, @FilterValue nvarchar(50), @curSpaceValue cursor, @curUsersValue cursor',
@StartRow, @MaximumRows, @FilterValue, @curSpace, @curUsers
CLOSE @curSpace
DEALLOCATE @curSpace
CLOSE @curUsers
DEALLOCATE @curUsers
RETURN

View file

@ -51,7 +51,7 @@ namespace WebsitePanel.EnterpriseServer
private bool isDemo;
private string comments;
private string username;
private string password;
// private string password;
private string firstName;
private string lastName;
private string email;
@ -78,6 +78,39 @@ namespace WebsitePanel.EnterpriseServer
{
}
public UserInfo(UserInfo src)
{
userId = src.userId;
ownerId = src.ownerId;
roleId = src.roleId;
statusId = src.statusId;
loginStatusId = src.loginStatusId;
failedLogins = src.failedLogins;
created = src.created;
changed = src.changed;
isPeer = src.isPeer;
isDemo = src.isDemo;
comments = src.comments;
username = src.username;
firstName = src.firstName;
lastName = src.lastName;
email = src.email;
secondaryEmail = src.secondaryEmail;
address = src.address;
city = src.city;
country = src.country;
state = src.state;
zip = src.zip;
primaryPhone = src.primaryPhone;
secondaryPhone = src.secondaryPhone;
fax = src.fax;
instantMessenger = src.instantMessenger;
htmlMail = src.htmlMail;
companyName = src.companyName;
ecommerceEnabled = src.ecommerceEnabled;
subscriberNumber = src.subscriberNumber;
}
/// <summary>
/// User role ID:
/// Administrator = 1,
@ -200,11 +233,11 @@ namespace WebsitePanel.EnterpriseServer
set { this.username = value; }
}
public string Password
{
get { return this.password; }
set { this.password = value; }
}
// public string Password
// {
// get { return this.password; }
// set { this.password = value; }
// }
public string FirstName
{
@ -347,7 +380,18 @@ namespace WebsitePanel.EnterpriseServer
{
public ushort VLanID { get; set; }
public string Comment { get; set; }
}
};
public class UserInfoInternal : UserInfo
{
private string password;
public string Password
{
get { return this.password; }
set { this.password = value; }
}
};
}

View file

@ -67,6 +67,7 @@ namespace WebsitePanel.EnterpriseServer
public const string RDS_POLICY = "RdsPolicy";
public const string USER_PASSWORD_EXPIRATION_LETTER = "UserPasswordExpirationLetter";
public const string USER_PASSWORD_RESET_LETTER = "UserPasswordResetLetter";
public const string USER_PASSWORD_REQUEST_LETTER = "OrganizationUserPasswordRequestLetter";
public const string USER_PASSWORD_RESET_PINCODE_LETTER = "UserPasswordResetPincodeLetter";
public const string HOSTED_ORGANIZATION_PASSWORD_POLICY = "MailboxPasswordPolicy";

View file

@ -12,7 +12,6 @@
// This source code was auto-generated by wsdl, Version=2.0.50727.3038.
//
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.Providers;
using WebsitePanel.Providers.Common;
@ -37,6 +36,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))]
public partial class esOrganizations : Microsoft.Web.Services3.WebServicesClientProtocol {
private System.Threading.SendOrPostCallback UpdateSupportServiceLevelOperationCompleted;
private System.Threading.SendOrPostCallback DeleteSupportServiceLevelOperationCompleted;
private System.Threading.SendOrPostCallback AddSupportServiceLevelOperationCompleted;
private System.Threading.SendOrPostCallback GetSupportServiceLevelOperationCompleted;
@ -93,6 +96,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
private System.Threading.SendOrPostCallback SendResetUserPasswordPincodeEmailOperationCompleted;
private System.Threading.SendOrPostCallback SendUserPasswordRequestSmsOperationCompleted;
private System.Threading.SendOrPostCallback SendUserPasswordRequestEmailOperationCompleted;
private System.Threading.SendOrPostCallback AddOrganizationDomainOperationCompleted;
private System.Threading.SendOrPostCallback ChangeOrganizationDomainTypeOperationCompleted;
@ -165,15 +172,17 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
private System.Threading.SendOrPostCallback GetSupportServiceLevelsOperationCompleted;
private System.Threading.SendOrPostCallback UpdateSupportServiceLevelOperationCompleted;
private System.Threading.SendOrPostCallback DeleteSupportServiceLevelOperationCompleted;
/// <remarks/>
public esOrganizations() {
this.Url = "http://localhost:9002/esOrganizations.asmx";
}
/// <remarks/>
public event UpdateSupportServiceLevelCompletedEventHandler UpdateSupportServiceLevelCompleted;
/// <remarks/>
public event DeleteSupportServiceLevelCompletedEventHandler DeleteSupportServiceLevelCompleted;
/// <remarks/>
public event AddSupportServiceLevelCompletedEventHandler AddSupportServiceLevelCompleted;
@ -258,6 +267,12 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
/// <remarks/>
public event SendResetUserPasswordPincodeEmailCompletedEventHandler SendResetUserPasswordPincodeEmailCompleted;
/// <remarks/>
public event SendUserPasswordRequestSmsCompletedEventHandler SendUserPasswordRequestSmsCompleted;
/// <remarks/>
public event SendUserPasswordRequestEmailCompletedEventHandler SendUserPasswordRequestEmailCompleted;
/// <remarks/>
public event AddOrganizationDomainCompletedEventHandler AddOrganizationDomainCompleted;
@ -367,10 +382,90 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
public event GetSupportServiceLevelsCompletedEventHandler GetSupportServiceLevelsCompleted;
/// <remarks/>
public event UpdateSupportServiceLevelCompletedEventHandler UpdateSupportServiceLevelCompleted;
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/UpdateSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void UpdateSupportServiceLevel(int levelID, string levelName, string levelDescription) {
this.Invoke("UpdateSupportServiceLevel", new object[] {
levelID,
levelName,
levelDescription});
}
/// <remarks/>
public event DeleteSupportServiceLevelCompletedEventHandler DeleteSupportServiceLevelCompleted;
public System.IAsyncResult BeginUpdateSupportServiceLevel(int levelID, string levelName, string levelDescription, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("UpdateSupportServiceLevel", new object[] {
levelID,
levelName,
levelDescription}, callback, asyncState);
}
/// <remarks/>
public void EndUpdateSupportServiceLevel(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void UpdateSupportServiceLevelAsync(int levelID, string levelName, string levelDescription) {
this.UpdateSupportServiceLevelAsync(levelID, levelName, levelDescription, null);
}
/// <remarks/>
public void UpdateSupportServiceLevelAsync(int levelID, string levelName, string levelDescription, object userState) {
if ((this.UpdateSupportServiceLevelOperationCompleted == null)) {
this.UpdateSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateSupportServiceLevelOperationCompleted);
}
this.InvokeAsync("UpdateSupportServiceLevel", new object[] {
levelID,
levelName,
levelDescription}, this.UpdateSupportServiceLevelOperationCompleted, userState);
}
private void OnUpdateSupportServiceLevelOperationCompleted(object arg) {
if ((this.UpdateSupportServiceLevelCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.UpdateSupportServiceLevelCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject DeleteSupportServiceLevel(int levelId) {
object[] results = this.Invoke("DeleteSupportServiceLevel", new object[] {
levelId});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginDeleteSupportServiceLevel(int levelId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteSupportServiceLevel", new object[] {
levelId}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndDeleteSupportServiceLevel(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void DeleteSupportServiceLevelAsync(int levelId) {
this.DeleteSupportServiceLevelAsync(levelId, null);
}
/// <remarks/>
public void DeleteSupportServiceLevelAsync(int levelId, object userState) {
if ((this.DeleteSupportServiceLevelOperationCompleted == null)) {
this.DeleteSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteSupportServiceLevelOperationCompleted);
}
this.InvokeAsync("DeleteSupportServiceLevel", new object[] {
levelId}, this.DeleteSupportServiceLevelOperationCompleted, userState);
}
private void OnDeleteSupportServiceLevelOperationCompleted(object arg) {
if ((this.DeleteSupportServiceLevelCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteSupportServiceLevelCompleted(this, new DeleteSupportServiceLevelCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -1603,6 +1698,107 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendUserPasswordRequestSms", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject SendUserPasswordRequestSms(int itemId, int accountId, string reason, string phoneTo) {
object[] results = this.Invoke("SendUserPasswordRequestSms", new object[] {
itemId,
accountId,
reason,
phoneTo});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSendUserPasswordRequestSms(int itemId, int accountId, string reason, string phoneTo, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SendUserPasswordRequestSms", new object[] {
itemId,
accountId,
reason,
phoneTo}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndSendUserPasswordRequestSms(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void SendUserPasswordRequestSmsAsync(int itemId, int accountId, string reason, string phoneTo) {
this.SendUserPasswordRequestSmsAsync(itemId, accountId, reason, phoneTo, null);
}
/// <remarks/>
public void SendUserPasswordRequestSmsAsync(int itemId, int accountId, string reason, string phoneTo, object userState) {
if ((this.SendUserPasswordRequestSmsOperationCompleted == null)) {
this.SendUserPasswordRequestSmsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendUserPasswordRequestSmsOperationCompleted);
}
this.InvokeAsync("SendUserPasswordRequestSms", new object[] {
itemId,
accountId,
reason,
phoneTo}, this.SendUserPasswordRequestSmsOperationCompleted, userState);
}
private void OnSendUserPasswordRequestSmsOperationCompleted(object arg) {
if ((this.SendUserPasswordRequestSmsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SendUserPasswordRequestSmsCompleted(this, new SendUserPasswordRequestSmsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendUserPasswordRequestEmail", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void SendUserPasswordRequestEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep) {
this.Invoke("SendUserPasswordRequestEmail", new object[] {
itemId,
accountId,
reason,
mailTo,
finalStep});
}
/// <remarks/>
public System.IAsyncResult BeginSendUserPasswordRequestEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SendUserPasswordRequestEmail", new object[] {
itemId,
accountId,
reason,
mailTo,
finalStep}, callback, asyncState);
}
/// <remarks/>
public void EndSendUserPasswordRequestEmail(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void SendUserPasswordRequestEmailAsync(int itemId, int accountId, string reason, string mailTo, bool finalStep) {
this.SendUserPasswordRequestEmailAsync(itemId, accountId, reason, mailTo, finalStep, null);
}
/// <remarks/>
public void SendUserPasswordRequestEmailAsync(int itemId, int accountId, string reason, string mailTo, bool finalStep, object userState) {
if ((this.SendUserPasswordRequestEmailOperationCompleted == null)) {
this.SendUserPasswordRequestEmailOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendUserPasswordRequestEmailOperationCompleted);
}
this.InvokeAsync("SendUserPasswordRequestEmail", new object[] {
itemId,
accountId,
reason,
mailTo,
finalStep}, this.SendUserPasswordRequestEmailOperationCompleted, userState);
}
private void OnSendUserPasswordRequestEmailOperationCompleted(object arg) {
if ((this.SendUserPasswordRequestEmailCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SendUserPasswordRequestEmailCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddOrganizationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int AddOrganizationDomain(int itemId, string domainName) {
@ -3517,98 +3713,42 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/UpdateSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void UpdateSupportServiceLevel(int levelID, string levelName, string levelDescription) {
this.Invoke("UpdateSupportServiceLevel", new object[] {
levelID,
levelName,
levelDescription});
}
/// <remarks/>
public System.IAsyncResult BeginUpdateSupportServiceLevel(int levelID, string levelName, string levelDescription, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("UpdateSupportServiceLevel", new object[] {
levelID,
levelName,
levelDescription}, callback, asyncState);
}
/// <remarks/>
public void EndUpdateSupportServiceLevel(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void UpdateSupportServiceLevelAsync(int levelID, string levelName, string levelDescription) {
this.UpdateSupportServiceLevelAsync(levelID, levelName, levelDescription, null);
}
/// <remarks/>
public void UpdateSupportServiceLevelAsync(int levelID, string levelName, string levelDescription, object userState) {
if ((this.UpdateSupportServiceLevelOperationCompleted == null)) {
this.UpdateSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateSupportServiceLevelOperationCompleted);
}
this.InvokeAsync("UpdateSupportServiceLevel", new object[] {
levelID,
levelName,
levelDescription}, this.UpdateSupportServiceLevelOperationCompleted, userState);
}
private void OnUpdateSupportServiceLevelOperationCompleted(object arg) {
if ((this.UpdateSupportServiceLevelCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.UpdateSupportServiceLevelCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject DeleteSupportServiceLevel(int levelId) {
object[] results = this.Invoke("DeleteSupportServiceLevel", new object[] {
levelId});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginDeleteSupportServiceLevel(int levelId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteSupportServiceLevel", new object[] {
levelId}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndDeleteSupportServiceLevel(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void DeleteSupportServiceLevelAsync(int levelId) {
this.DeleteSupportServiceLevelAsync(levelId, null);
}
/// <remarks/>
public void DeleteSupportServiceLevelAsync(int levelId, object userState) {
if ((this.DeleteSupportServiceLevelOperationCompleted == null)) {
this.DeleteSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteSupportServiceLevelOperationCompleted);
}
this.InvokeAsync("DeleteSupportServiceLevel", new object[] {
levelId}, this.DeleteSupportServiceLevelOperationCompleted, userState);
}
private void OnDeleteSupportServiceLevelOperationCompleted(object arg) {
if ((this.DeleteSupportServiceLevelCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteSupportServiceLevelCompleted(this, new DeleteSupportServiceLevelCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void UpdateSupportServiceLevelCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteSupportServiceLevelCompletedEventHandler(object sender, DeleteSupportServiceLevelCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteSupportServiceLevelCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal DeleteSupportServiceLevelCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AddSupportServiceLevelCompletedEventHandler(object sender, AddSupportServiceLevelCompletedEventArgs e);
@ -4227,6 +4367,36 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SendUserPasswordRequestSmsCompletedEventHandler(object sender, SendUserPasswordRequestSmsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SendUserPasswordRequestSmsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal SendUserPasswordRequestSmsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SendUserPasswordRequestEmailCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AddOrganizationDomainCompletedEventHandler(object sender, AddOrganizationDomainCompletedEventArgs e);
@ -5096,34 +5266,4 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void UpdateSupportServiceLevelCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteSupportServiceLevelCompletedEventHandler(object sender, DeleteSupportServiceLevelCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteSupportServiceLevelCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal DeleteSupportServiceLevelCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
}

View file

@ -31,6 +31,8 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback GetSystemSettingsActiveOperationCompleted;
private System.Threading.SendOrPostCallback CheckIsTwilioEnabledOperationCompleted;
private System.Threading.SendOrPostCallback SetSystemSettingsOperationCompleted;
/// <remarks/>
@ -44,6 +46,9 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
public event GetSystemSettingsActiveCompletedEventHandler GetSystemSettingsActiveCompleted;
/// <remarks/>
public event CheckIsTwilioEnabledCompletedEventHandler CheckIsTwilioEnabledCompleted;
/// <remarks/>
public event SetSystemSettingsCompletedEventHandler SetSystemSettingsCompleted;
@ -132,6 +137,44 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CheckIsTwilioEnabled", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool CheckIsTwilioEnabled() {
object[] results = this.Invoke("CheckIsTwilioEnabled", new object[0]);
return ((bool)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginCheckIsTwilioEnabled(System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("CheckIsTwilioEnabled", new object[0], callback, asyncState);
}
/// <remarks/>
public bool EndCheckIsTwilioEnabled(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
/// <remarks/>
public void CheckIsTwilioEnabledAsync() {
this.CheckIsTwilioEnabledAsync(null);
}
/// <remarks/>
public void CheckIsTwilioEnabledAsync(object userState) {
if ((this.CheckIsTwilioEnabledOperationCompleted == null)) {
this.CheckIsTwilioEnabledOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckIsTwilioEnabledOperationCompleted);
}
this.InvokeAsync("CheckIsTwilioEnabled", new object[0], this.CheckIsTwilioEnabledOperationCompleted, userState);
}
private void OnCheckIsTwilioEnabledOperationCompleted(object arg) {
if ((this.CheckIsTwilioEnabledCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.CheckIsTwilioEnabledCompleted(this, new CheckIsTwilioEnabledCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetSystemSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int SetSystemSettings(string settingsName, SystemSettings settings) {
@ -234,6 +277,32 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void CheckIsTwilioEnabledCompletedEventHandler(object sender, CheckIsTwilioEnabledCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CheckIsTwilioEnabledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal CheckIsTwilioEnabledCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public bool Result {
get {
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SetSystemSettingsCompletedEventHandler(object sender, SetSystemSettingsCompletedEventArgs e);

View file

@ -840,20 +840,23 @@ namespace WebsitePanel.EnterpriseServer
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddUser", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int AddUser(UserInfo user, bool sendLetter)
public int AddUser(UserInfo user, bool sendLetter, string password)
{
object[] results = this.Invoke("AddUser", new object[] {
user,
sendLetter});
sendLetter,
password
});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginAddUser(UserInfo user, bool sendLetter, System.AsyncCallback callback, object asyncState)
public System.IAsyncResult BeginAddUser(UserInfo user, bool sendLetter, string password, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("AddUser", new object[] {
user,
sendLetter}, callback, asyncState);
sendLetter,
password}, callback, asyncState);
}
/// <remarks/>
@ -864,13 +867,13 @@ namespace WebsitePanel.EnterpriseServer
}
/// <remarks/>
public void AddUserAsync(UserInfo user, bool sendLetter)
public void AddUserAsync(UserInfo user, bool sendLetter, string password)
{
this.AddUserAsync(user, sendLetter, null);
this.AddUserAsync(user, sendLetter, password, null);
}
/// <remarks/>
public void AddUserAsync(UserInfo user, bool sendLetter, object userState)
public void AddUserAsync(UserInfo user, bool sendLetter, string password, object userState)
{
if ((this.AddUserOperationCompleted == null))
{
@ -878,7 +881,8 @@ namespace WebsitePanel.EnterpriseServer
}
this.InvokeAsync("AddUser", new object[] {
user,
sendLetter}, this.AddUserOperationCompleted, userState);
sendLetter,
password}, this.AddUserOperationCompleted, userState);
}
private void OnAddUserOperationCompleted(object arg)

View file

@ -69,7 +69,7 @@ namespace WebsitePanel.EnterpriseServer
protected override string AuthenticateToken(UsernameToken token)
{
// try to load user account
UserInfo user = UserController.GetUserInternally(token.Username);
UserInfoInternal user = UserController.GetUserInternally(token.Username);
if (user == null)
return null;

View file

@ -182,7 +182,7 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer.ContractSystem
//
if (customerId > -1)
{
ES.UserInfo userInfo = (internally) ? ES.UserController.GetUserInternally(customerId) :
ES.UserInfoInternal userInfo = (internally) ? ES.UserController.GetUserInternally(customerId) :
ES.UserController.GetUser(customerId);
//
if (internally)

View file

@ -520,12 +520,12 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer
return settings;
}
private CommandParams PrepeareAccountParams(UserInfo userInfo)
private CommandParams PrepeareAccountParams(UserInfo userInfo, string password)
{
CommandParams args = new CommandParams();
args[CommandParams.USERNAME] = userInfo.Username;
args[CommandParams.PASSWORD] = userInfo.Password;
args[CommandParams.PASSWORD] = password;
args[CommandParams.FIRST_NAME] = userInfo.FirstName;
args[CommandParams.LAST_NAME] = userInfo.LastName;
args[CommandParams.EMAIL] = userInfo.Email;

View file

@ -113,7 +113,7 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer
// create user account
ES.UserInfo userInfo = new ES.UserInfo();
userInfo.Username = account[ContractAccount.USERNAME];
userInfo.Password = account[ContractAccount.PASSWORD];
// userInfo.Password = account[ContractAccount.PASSWORD];
userInfo.Email = account[ContractAccount.EMAIL];
userInfo.FirstName = account[ContractAccount.FIRST_NAME];
userInfo.LastName = account[ContractAccount.LAST_NAME];
@ -133,7 +133,7 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer
userInfo.OwnerId = contract.ResellerId;
userInfo.Created = DateTime.Now;
// create account
int resultCode = ES.UserController.AddUser(userInfo, true);
int resultCode = ES.UserController.AddUser(userInfo, true, account[ContractAccount.PASSWORD]);
//
if (resultCode > 0)
{

View file

@ -1632,6 +1632,73 @@ namespace WebsitePanel.EnterpriseServer
return result;
}
public static ResultObject SendUserPasswordRequestSms(int itemId, int accountId, string reason, string phoneTo = null)
{
var result = TaskManager.StartResultTask<ResultObject>("ORGANIZATION", "SEND_USER_PASSWORD_REQUEST_SMS",
itemId);
try
{
// load organization
Organization org = GetOrganization(itemId);
if (org == null)
{
throw new Exception(string.Format("Organization not found (ItemId = {0})", itemId));
}
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
OrganizationUser user = OrganizationController.GetUserGeneralSettingsWithExtraData(itemId, accountId);
user.ItemId = itemId;
if (string.IsNullOrEmpty(phoneTo))
{
phoneTo = user.MobilePhone;
}
UserSettings settings = UserController.GetUserSettings(owner.UserId, UserSettings.USER_PASSWORD_REQUEST_LETTER);
string body = settings["SMSBody"];
var pincode = GeneratePincode();
Guid token;
var items = new Hashtable();
items["passwordResetLink"] = GenerateUserPasswordResetLink(user.ItemId, user.AccountId, out token, pincode);
body = PackageController.EvaluateTemplate(body, items);
TaskManager.Write("Organization ID : " + user.ItemId);
TaskManager.Write("Account : " + user.DisplayName);
TaskManager.Write("Reason : " + reason);
TaskManager.Write("SmsTo : " + phoneTo);
// send Sms message
var response = SendSms(phoneTo, body);
if (response.RestException != null)
{
throw new Exception(response.RestException.Message);
}
SetAccessTokenResponse(token, pincode);
}
catch (Exception ex)
{
TaskManager.WriteError(ex);
TaskManager.CompleteResultTask(result);
result.AddError("", ex);
return result;
}
TaskManager.CompleteResultTask();
return result;
}
public static ResultObject SendResetUserPasswordPincodeSms(Guid token, string phoneTo = null)
{
var result = TaskManager.StartResultTask<ResultObject>("ORGANIZATION", "SEND_USER_PASSWORD_RESET_SMS_PINCODE");
@ -1851,6 +1918,33 @@ namespace WebsitePanel.EnterpriseServer
SendUserPasswordEmail(owner, user, reason, mailTo, logoUrl, UserSettings.USER_PASSWORD_RESET_LETTER, "USER_PASSWORD_RESET_LETTER", finalStep);
}
public static void SendUserPasswordRequestEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep)
{
// load organization
Organization org = GetOrganization(itemId);
if (org == null)
{
throw new Exception(string.Format("Organization not found (ItemId = {0})", itemId));
}
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
OrganizationUser user = OrganizationController.GetUserGeneralSettingsWithExtraData(itemId, accountId);
user.ItemId = itemId;
if (string.IsNullOrEmpty(mailTo))
{
mailTo = user.PrimaryEmailAddress;
}
var generalSettings = OrganizationController.GetOrganizationGeneralSettings(itemId);
var logoUrl = generalSettings != null ? generalSettings.OrganizationLogoUrl : string.Empty;
SendUserPasswordEmail(owner, user, reason, mailTo, logoUrl, UserSettings.USER_PASSWORD_REQUEST_LETTER, "USER_PASSWORD_REQUEST_LETTER", finalStep);
}
public static void SendUserExpirationPasswordEmail(UserInfo owner, OrganizationUser user, string reason,
string mailTo, string logoUrl)
{
@ -1919,8 +2013,6 @@ namespace WebsitePanel.EnterpriseServer
}
}
public static AccessToken GetAccessToken(Guid accessToken, AccessTokenTypes type)
{
return ObjectUtils.FillObjectFromDataReader<AccessToken>(DataProvider.GetAccessTokenByAccessToken(accessToken, type));

View file

@ -422,7 +422,7 @@ namespace WebsitePanel.EnterpriseServer
return result;
// load user info
UserInfo user = UserController.GetUser(userId);
UserInfoInternal user = UserController.GetUser(userId);
if (createFtpAccount)
{
@ -2086,7 +2086,7 @@ namespace WebsitePanel.EnterpriseServer
items["user"] = user;
// get reseller details
UserInfo reseller = UserController.GetUser(user.OwnerId);
UserInfoInternal reseller = UserController.GetUser(user.OwnerId);
if (reseller != null)
{
reseller.Password = "";
@ -2123,7 +2123,7 @@ namespace WebsitePanel.EnterpriseServer
items["user"] = user;
// get reseller details
UserInfo reseller = UserController.GetUser(user.OwnerId);
UserInfoInternal reseller = UserController.GetUser(user.OwnerId);
if (reseller != null)
{
reseller.Password = "";

View file

@ -112,10 +112,12 @@ namespace WebsitePanel.EnterpriseServer
UserInfo user = PackageController.GetPackageOwner(item.PackageId);
if (user != null)
{
UserInfoInternal userInternal = UserController.GetUserInternally(user.UserId);
site.StatisticsUrl = Utils.ReplaceStringVariable(site.StatisticsUrl, "username",
HttpUtility.UrlEncode(user.Username));
HttpUtility.UrlEncode(userInternal.Username));
site.StatisticsUrl = Utils.ReplaceStringVariable(site.StatisticsUrl, "password",
HttpUtility.UrlEncode(user.Password));
HttpUtility.UrlEncode(userInternal.Password));
}
}

View file

@ -202,5 +202,15 @@ namespace WebsitePanel.EnterpriseServer
TaskManager.CompleteTask();
}
}
public static bool CheckIsTwilioEnabled()
{
var settings = SystemController.GetSystemSettingsActive(SystemSettings.TWILIO_SETTINGS, false);
return settings != null
&& !string.IsNullOrEmpty(settings.GetValueOrDefault(SystemSettings.TWILIO_ACCOUNTSID_KEY, string.Empty))
&& !string.IsNullOrEmpty(settings.GetValueOrDefault(SystemSettings.TWILIO_AUTHTOKEN_KEY, string.Empty))
&& !string.IsNullOrEmpty(settings.GetValueOrDefault(SystemSettings.TWILIO_PHONEFROM_KEY, string.Empty));
}
}
}

View file

@ -58,7 +58,7 @@ namespace WebsitePanel.EnterpriseServer
try
{
// try to get user from database
UserInfo user = GetUserInternally(username);
UserInfoInternal user = GetUserInternally(username);
// check if the user exists
if (user == null)
@ -99,7 +99,7 @@ namespace WebsitePanel.EnterpriseServer
// compare user passwords
if (user.Password != password)
if (CryptoUtils.SHA1(user.Password) != password)
{
if (lockOut >= 0)
DataProvider.UpdateUserFailedLoginAttempt(user.UserId, lockOut, false);
@ -145,7 +145,7 @@ namespace WebsitePanel.EnterpriseServer
try
{
// try to get user from database
UserInfo user = GetUserInternally(username);
UserInfoInternal user = GetUserInternally(username);
// check if the user exists
if (user == null)
@ -155,8 +155,8 @@ namespace WebsitePanel.EnterpriseServer
}
// compare user passwords
if (user.Password == password)
return user;
if (CryptoUtils.SHA1(user.Password) == password)
return new UserInfo(user);
return null;
}
@ -239,7 +239,7 @@ namespace WebsitePanel.EnterpriseServer
items["Email"] = true;
// get reseller details
UserInfo reseller = UserController.GetUser(user.OwnerId);
UserInfoInternal reseller = UserController.GetUser(user.OwnerId);
if (reseller != null)
{
reseller.Password = "";
@ -264,10 +264,10 @@ namespace WebsitePanel.EnterpriseServer
}
}
internal static UserInfo GetUserInternally(int userId)
internal static UserInfoInternal GetUserInternally(int userId)
{
// try to get user from database
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(
UserInfoInternal user = ObjectUtils.FillObjectFromDataReader<UserInfoInternal>(
DataProvider.GetUserByIdInternally(userId));
if (user != null)
@ -275,10 +275,10 @@ namespace WebsitePanel.EnterpriseServer
return user;
}
internal static UserInfo GetUserInternally(string username)
internal static UserInfoInternal GetUserInternally(string username)
{
// try to get user from database
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(
UserInfoInternal user = ObjectUtils.FillObjectFromDataReader<UserInfoInternal>(
DataProvider.GetUserByUsernameInternally(username));
if (user != null)
@ -288,10 +288,10 @@ namespace WebsitePanel.EnterpriseServer
return user;
}
public static UserInfo GetUser(int userId)
public static UserInfoInternal GetUser(int userId)
{
// try to get user from database
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(
UserInfoInternal user = ObjectUtils.FillObjectFromDataReader<UserInfoInternal>(
DataProvider.GetUserById(SecurityContext.User.UserId, userId));
if (user != null)
@ -299,10 +299,10 @@ namespace WebsitePanel.EnterpriseServer
return user;
}
public static UserInfo GetUser(string username)
public static UserInfoInternal GetUser(string username)
{
// try to get user from database
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(
UserInfoInternal user = ObjectUtils.FillObjectFromDataReader<UserInfoInternal>(
DataProvider.GetUserByUsername(SecurityContext.User.UserId, username));
if (user != null)
@ -381,7 +381,7 @@ namespace WebsitePanel.EnterpriseServer
return DataProvider.GetUsers(SecurityContext.User.UserId, ownerId, recursive);
}
public static int AddUser(UserInfo user, bool sendLetter)
public static int AddUser(UserInfo user, bool sendLetter, string password)
{
// check account
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo);
@ -424,7 +424,7 @@ namespace WebsitePanel.EnterpriseServer
user.IsPeer,
user.Comments,
user.Username.Trim(),
CryptoUtils.Encrypt(user.Password),
CryptoUtils.Encrypt(password),
user.FirstName,
user.LastName,
user.Email,

View file

@ -119,11 +119,11 @@ namespace WebsitePanel.EnterpriseServer
user.Email = email;
user.SecondaryEmail = secondaryEmail;
user.Username = username;
user.Password = password;
// user.Password = password;
user.HtmlMail = htmlMail;
// add a new user
createdUserId = UserController.AddUser(user, false);
createdUserId = UserController.AddUser(user, false, password);
if (createdUserId < 0)
{
// exit

View file

@ -211,6 +211,18 @@ namespace WebsitePanel.EnterpriseServer
}
[WebMethod]
public ResultObject SendUserPasswordRequestSms(int itemId, int accountId, string reason, string phoneTo)
{
return OrganizationController.SendUserPasswordRequestSms(itemId, accountId, reason, phoneTo);
}
[WebMethod]
public void SendUserPasswordRequestEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep)
{
OrganizationController.SendUserPasswordRequestEmail(itemId, accountId, reason, mailTo, finalStep);
}
#endregion
#region Domains

View file

@ -59,6 +59,12 @@ namespace WebsitePanel.EnterpriseServer
return SystemController.GetSystemSettingsActive(settingsName, decrypt);
}
[WebMethod]
public bool CheckIsTwilioEnabled()
{
return SystemController.CheckIsTwilioEnabled();
}
[WebMethod]
public int SetSystemSettings(string settingsName, SystemSettings settings)
{

View file

@ -57,13 +57,15 @@ namespace WebsitePanel.EnterpriseServer
[WebMethod]
public UserInfo GetUserById(int userId)
{
return UserController.GetUser(userId);
UserInfoInternal uinfo = UserController.GetUser(userId);
return (uinfo != null) ? new UserInfo(uinfo) : null;
}
[WebMethod]
public UserInfo GetUserByUsername(string username)
{
return UserController.GetUser(username);
UserInfoInternal uinfo = UserController.GetUser(username);
return (uinfo != null) ? new UserInfo(uinfo) : null;
}
[WebMethod]
@ -136,9 +138,9 @@ namespace WebsitePanel.EnterpriseServer
}
[WebMethod]
public int AddUser(UserInfo user, bool sendLetter)
public int AddUser(UserInfo user, bool sendLetter, string password)
{
return UserController.AddUser(user, sendLetter);
return UserController.AddUser(user, sendLetter, password);
}
[WebMethod]
@ -175,7 +177,7 @@ namespace WebsitePanel.EnterpriseServer
user.IsPeer = isPeer;
user.IsDemo = isDemo;
user.Username = username;
user.Password = password;
// user.Password = password;
user.FirstName = firstName;
user.LastName = lastName;
user.Email = email;
@ -192,7 +194,7 @@ namespace WebsitePanel.EnterpriseServer
user.HtmlMail = htmlMail;
user.CompanyName = companyName;
user.EcommerceEnabled = ecommerceEnabled;
return UserController.AddUser(user, sendLetter);
return UserController.AddUser(user, sendLetter, password);
}
[WebMethod]

View file

@ -4479,7 +4479,7 @@ namespace WebsitePanel.Providers.HostedSolution
{
ExchangeLog.LogStart("CheckOrganizationPublicFolderMailbox");
Collection<PSObject> result = GetPublicFolderMailbox(runSpace, orgCanonicalName, GetPublicFolderMailboxName(organizationId));
Collection<PSObject> result = GetPublicFolderMailbox(runSpace, orgCanonicalName, GetPublicFolderMailboxName(organizationId), true);
if (result == null || result.Count == 0)
{
ExchangeTransaction transaction = StartTransaction();
@ -4501,7 +4501,7 @@ namespace WebsitePanel.Providers.HostedSolution
{
ExchangeLog.LogStart("CheckOrganizationRootFolder");
Collection<PSObject> result = GetPublicFolderObject(runSpace, orgCanonicalName+"/"+GetPublicFolderMailboxName(organizationId), "\\" + folder);
Collection<PSObject> result = GetPublicFolderObject(runSpace, orgCanonicalName+"/"+GetPublicFolderMailboxName(organizationId), "\\" + folder, true);
if (result == null || result.Count == 0)
{
ExchangeTransaction transaction = StartTransaction();
@ -4617,22 +4617,22 @@ namespace WebsitePanel.Providers.HostedSolution
ExchangeLog.LogEnd("DeletePublicFolderInternal");
}
private Collection<PSObject> GetPublicFolderObject(Runspace runSpace, string mailbox, string id)
private Collection<PSObject> GetPublicFolderObject(Runspace runSpace, string mailbox, string id, bool checkExist = false)
{
Command cmd = new Command("Get-PublicFolder");
cmd.Parameters.Add("Identity", id);
//cmd.Parameters.Add("Mailbox", mailbox);
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd);
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd, true, !checkExist);
return result;
}
private Collection<PSObject> GetPublicFolderMailbox(Runspace runSpace, string organizationDistinguishedName, string name)
private Collection<PSObject> GetPublicFolderMailbox(Runspace runSpace, string organizationDistinguishedName, string name, bool checkExist)
{
Command cmd = new Command("Get-Mailbox");
cmd.Parameters.Add("Identity", name);
cmd.Parameters.Add("PublicFolder");
cmd.Parameters.Add("OrganizationalUnit", organizationDistinguishedName);
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd);
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd, true, !checkExist);
return result;
}
@ -5369,7 +5369,7 @@ namespace WebsitePanel.Providers.HostedSolution
string resultObjectDN = null;
Command cmd = new Command("Get-AddressList");
cmd.Parameters.Add("Identity", id);
Collection<PSObject> result = this.ExecuteShellCommand(runSpace, cmd);
Collection<PSObject> result = this.ExecuteShellCommand(runSpace, cmd, true, false);
if ((result != null) && (result.Count > 0))
{
resultObjectDN = this.GetResultObjectDN(result);
@ -6242,13 +6242,19 @@ namespace WebsitePanel.Providers.HostedSolution
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd)
{
return ExecuteShellCommand(runSpace, cmd, true);
return ExecuteShellCommand(runSpace, cmd, true, true);
}
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController)
{
object[] errors;
return ExecuteShellCommand(runSpace, cmd, useDomainController, out errors);
return ExecuteShellCommand(runSpace, cmd, useDomainController, out errors, true);
}
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController, bool writeErrorExchangeLog)
{
object[] errors;
return ExecuteShellCommand(runSpace, cmd, useDomainController, out errors, writeErrorExchangeLog);
}
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, ResultObject res)
@ -6272,10 +6278,10 @@ namespace WebsitePanel.Providers.HostedSolution
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, out object[] errors)
{
return ExecuteShellCommand(runSpace, cmd, true, out errors);
return ExecuteShellCommand(runSpace, cmd, true, out errors, true);
}
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController, out object[] errors)
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController, out object[] errors, bool writeErrorExchangeLog)
{
ExchangeLog.LogStart("ExecuteShellCommand");
List<object> errorList = new List<object>();
@ -6309,8 +6315,12 @@ namespace WebsitePanel.Providers.HostedSolution
foreach (object item in pipeLine.Error.ReadToEnd())
{
errorList.Add(item);
string errorMessage = string.Format("Invoke error: {0}", item);
ExchangeLog.LogWarning(errorMessage);
if (writeErrorExchangeLog)
{
string errorMessage = string.Format("Invoke error: {0}", item);
ExchangeLog.LogWarning(errorMessage);
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before After
Before After

View file

@ -455,4 +455,76 @@ div#breadcrumb_wrapper a:last-child {
.navbar-right {
margin-right: 0;
}
}
.navbar-inverse {
background-color: #F4F4F4;
border-color: #d4d4d4;
background: rgb(251,251,251);
background: -moz-linear-gradient(top, rgba(251,251,251,1) 0%, rgba(242,242,242,1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(251,251,251,1)), color-stop(100%,rgba(242,242,242,1)));
background: -webkit-linear-gradient(top, rgba(251,251,251,1) 0%,rgba(242,242,242,1) 100%);
background: -o-linear-gradient(top, rgba(251,251,251,1) 0%,rgba(242,242,242,1) 100%);
background: -ms-linear-gradient(top, rgba(251,251,251,1) 0%,rgba(242,242,242,1) 100%);
background: linear-gradient(to bottom, rgba(251,251,251,1) 0%,rgba(242,242,242,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fbfbfb', endColorstr='#f2f2f2',GradientType=0 );
-webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1);
-moz-box-shadow: 0 1px 10px rgba(0,0,0,.1);
box-shadow: 0 1px 10px rgba(0,0,0,.1);
}
.navbar-inverse .navbar-text, .navbar-inverse .navbar-brand, .navbar-text, #logout {
color: #565656;
}
.navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus, .navbar-text:hover, #logout:hover {
color: #565656;
background-color: transparent;
opacity: 1;
}
div#breadcrumb_wrapper {
background-color: #F7F7F7;
border: 1px solid #d4d4d4;
margin-top: 9px;
}
.progress {
height:21px;
background-color: #ffffff;
border: 1px solid #BBBBBB;
border-radius: 3px!important;
}
.progress-bar {
background-color: #F4C18F;
-webkit-box-shadow: none;
box-shadow: none;
}
body {
background-color: #FAFAFA;
}
p.progress-text {
position: absolute;
left: 44%;
color: #515151;
}
p.resource-subtext {
color: #AEAEAE;
}
#logout :hover {
color: #333;
}
.file-link:hover {
text-decoration:none;
}
.file-link p {
color: #818181;
font-size: 13pt;
}
.file-link p:hover {
color: #333!important;
}
.icon-size {
width: 60px;
height: 60px;
}

View file

@ -88,11 +88,11 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
/// <summary>
/// Looks up a localized string similar to Address Inforamtion.
/// Looks up a localized string similar to Address Information.
/// </summary>
public static string AddressInforamtion {
public static string AddressInformation {
get {
return ResourceManager.GetString("AddressInforamtion", resourceCulture);
return ResourceManager.GetString("AddressInformation", resourceCulture);
}
}

View file

@ -123,8 +123,8 @@
<data name="Address" xml:space="preserve">
<value>Address</value>
</data>
<data name="AddressInforamtion" xml:space="preserve">
<value>Address Inforamtion</value>
<data name="AddressInformation" xml:space="preserve">
<value>Address Information</value>
</data>
<data name="Back" xml:space="preserve">
<value>Back</value>

View file

@ -169,7 +169,7 @@
<div class="panel-heading" role="tab" id="heading-address-information">
<h4 class="panel-title">
<a class="collapsed" data-toggle="collapse" href="#address-information" aria-expanded="false" aria-controls="address-information">
@UI.AddressInforamtion
@UI.AddressInformation
</a>
</h4>
</div>

View file

@ -64,7 +64,7 @@
<p class="progress-text">@percent%</p>
</div>
</div>
<p>@ViewDataHelper.BytesToSize(resource.ContentLength) / @ViewDataHelper.BytesToSize(resource.AllocatedSpace)</p>
<p class="resource-subtext">@ViewDataHelper.BytesToSize(resource.ContentLength) / @ViewDataHelper.BytesToSize(resource.AllocatedSpace)</p>
}
<div class="selected-element-overlay">

View file

@ -43,6 +43,7 @@ using System.Web.Security;
using System.Web.UI.WebControls;
using System.Net;
using System.Net.Mail;
using System.Security.Cryptography;
using Microsoft.Web.Services3;
using WebsitePanel.EnterpriseServer;
@ -336,15 +337,30 @@ namespace WebsitePanel.Portal
return DefaultPage.GetLocalizedPageName(pageId);
}
public static string SHA1(string plainText)
{
// Convert plain text into a byte array.
byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);
HashAlgorithm hash = new SHA1Managed(); ;
// Compute hash value of our plain text with appended salt.
byte[] hashBytes = hash.ComputeHash(plainTextBytes);
// Return the result.
return Convert.ToBase64String(hashBytes);
}
public static int AuthenticateUser(string username, string password, string ipAddress,
bool rememberLogin, string preferredLocale, string theme)
{
esAuthentication authService = new esAuthentication();
ConfigureEnterpriseServerProxy(authService, false);
string passwordSH = SHA1(password);
try
{
int authResult = authService.AuthenticateUser(username, password, ipAddress);
int authResult = authService.AuthenticateUser(username, passwordSH, ipAddress);
if (authResult < 0)
{
@ -352,13 +368,13 @@ namespace WebsitePanel.Portal
}
else
{
UserInfo user = authService.GetUserByUsernamePassword(username, password, ipAddress);
UserInfo user = authService.GetUserByUsernamePassword(username, passwordSH, ipAddress);
if (user != null)
{
if (IsRoleAllowedToLogin(user.Role))
{
// issue authentication ticket
FormsAuthenticationTicket ticket = CreateAuthTicket(user.Username, user.Password, user.Role, rememberLogin);
FormsAuthenticationTicket ticket = CreateAuthTicket(user.Username, password, user.Role, rememberLogin);
SetAuthTicket(ticket, rememberLogin);
CompleteUserLogin(username, rememberLogin, preferredLocale, theme);
@ -513,7 +529,7 @@ namespace WebsitePanel.Portal
}
}
public static int AddUserAccount(List<string> log, UserInfo user, bool sendLetter)
public static int AddUserAccount(List<string> log, UserInfo user, bool sendLetter, string password)
{
esUsers usersService = new esUsers();
ConfigureEnterpriseServerProxy(usersService, true);
@ -521,7 +537,7 @@ namespace WebsitePanel.Portal
try
{
// add user to WebsitePanel server
return usersService.AddUser(user, sendLetter);
return usersService.AddUser(user, sendLetter, password);
}
catch (Exception ex)
{

View file

@ -0,0 +1,162 @@
<?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="lblFrom.Text" xml:space="preserve">
<value>From:</value>
</data>
<data name="lblHtmlBody.Text" xml:space="preserve">
<value>HTML Body:</value>
</data>
<data name="lblLogoUrl.Text" xml:space="preserve">
<value>Logo Url:</value>
</data>
<data name="lblNoChangesHtmlBody" xml:space="preserve">
<value>No Changes HTML Body:</value>
</data>
<data name="lblNoChangesTextBody.Text" xml:space="preserve">
<value>No Changes Text Body:</value>
</data>
<data name="lblPasswordResetLinkSmsBody.Text" xml:space="preserve">
<value>Password Reset Link Sms Body:</value>
</data>
<data name="lblPasswordResetPincodeSmsBody.Text" xml:space="preserve">
<value>Password Reset Link Pincode 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>
<data name="lblSmsBody.Text" xml:space="preserve">
<value>SMS</value>
</data>
</root>

View file

@ -172,7 +172,7 @@
<value>Webdav Portal URL</value>
</data>
<data name="WebdavPortalSettings.Text" xml:space="preserve">
<value>Webdav Portal</value>
<value>Organization Password Reset Module</value>
</data>
<data name="chkEnablePasswordReset.Text" xml:space="preserve">
<value>Yes</value>

View file

@ -159,4 +159,7 @@
<data name="lnkOrganizationUserPasswordResetPincodeLetter.Text" xml:space="preserve">
<value>Organization User Password Reset Pincode Letter</value>
</data>
<data name="lnkOrganizationUserPasswordRequestLetter.Text" xml:space="preserve">
<value>Organization User Password Request Letter</value>
</data>
</root>

View file

@ -210,10 +210,10 @@ namespace WebsitePanel.Portal
return dsUsers;
}
public static int AddUser(List<string> log, int portalId, UserInfo user, bool sendLetter)
public static int AddUser(List<string> log, int portalId, UserInfo user, bool sendLetter, string password)
{
// add user to WebsitePanel server
return ES.Services.Users.AddUser(user, sendLetter);
return ES.Services.Users.AddUser(user, sendLetter, password);
}
public static void AddUserVLan(int userId, UserVlan vLan)

View file

@ -8,6 +8,7 @@
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/MailboxPlanSelector.ascx" TagName="MailboxPlanSelector" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SendToControl.ascx" TagName="SendToControl" TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
@ -105,12 +106,17 @@
</wsp:EmailAddress>
</td>
</tr>
<tr>
<tr>
<td colspan="2">
<wsp:SendToControl id="sendToControl" runat="server" ValidationGroup="CreateMailbox" ControlToHide="PasswordBlock"></wsp:SendToControl>
</td>
</tr>
<tr id="PasswordBlock" runat="server" Visible="false">
<td class="FormLabel150" valign="top"><asp:Localize ID="locPassword" runat="server" meta:resourcekey="locPassword" Text="Password: *"></asp:Localize></td>
<td>
<wsp:PasswordControl id="password" runat="server" ValidationGroup="CreateMailbox" AllowGeneratePassword="true">
<wsp:PasswordControl id="password" runat="server" ValidationGroup="CreateMailbox" AllowGeneratePassword="false">
</wsp:PasswordControl>
<asp:CheckBox ID="chkUserMustChangePassword" runat="server" meta:resourcekey="chkUserMustChangePassword" Text="User must change password at next login" />
<asp:CheckBox ID="chkUserMustChangePassword" runat="server" meta:resourcekey="chkUserMustChangePassword" Text="User must change password at next login" Visible="False"/>
</td>
</tr>
<tr>

View file

@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Web.Security;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
@ -161,12 +162,19 @@ namespace WebsitePanel.Portal.ExchangeServer
string subscriberNumber = IsNewUser ? txtSubscriberNumber.Text.Trim() : userSelector.GetSubscriberNumber();
var passwordString = password.Password;
if (sendToControl.IsRequestSend && IsNewUser)
{
passwordString = Membership.GeneratePassword(16, 3);
}
accountId = ES.Services.ExchangeServer.CreateMailbox(PanelRequest.ItemID, accountId, type,
accountName,
displayName,
name,
domain,
password.Password,
passwordString,
chkSendInstructions.Checked,
sendInstructionEmail.Text,
Convert.ToInt32(mailboxPlanSelector.MailboxPlanId),
@ -187,6 +195,15 @@ namespace WebsitePanel.Portal.ExchangeServer
}
}
if (sendToControl.SendEmail && IsNewUser)
{
ES.Services.Organizations.SendUserPasswordRequestEmail(PanelRequest.ItemID, accountId, "User creation", sendToControl.Email, true);
}
else if (sendToControl.SendMobile && IsNewUser)
{
ES.Services.Organizations.SendUserPasswordRequestSms(PanelRequest.ItemID, accountId, "User creation", sendToControl.Mobile);
}
Response.Redirect(EditUrl("AccountID", accountId.ToString(), "mailbox_settings",
"SpaceID=" + PanelSecurity.PackageId.ToString(),
"ItemID=" + PanelRequest.ItemID.ToString()));

View file

@ -228,6 +228,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.EmailAddress email;
/// <summary>
/// sendToControl control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SendToControl sendToControl;
/// <summary>
/// PasswordBlock control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow PasswordBlock;
/// <summary>
/// locPassword control.
/// </summary>

View file

@ -5,106 +5,122 @@
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EmailControl.ascx" TagName="EmailControl" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SendToControl.ascx" TagName="SendToControl" TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<div runat="server" id="divWrapper">
<script language="javascript" type="text/javascript">
function buildDisplayName() {
document.getElementById("<%= txtDisplayName.ClientID %>").value = '';
<script language="javascript" type="text/javascript">
function buildDisplayName() {
document.getElementById("<%= txtDisplayName.ClientID %>").value = '';
if (document.getElementById("<%= txtFirstName.ClientID %>").value != '')
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtFirstName.ClientID %>").value + ' ';
if (document.getElementById("<%= txtFirstName.ClientID %>").value != '')
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtFirstName.ClientID %>").value + ' ';
if (document.getElementById("<%= txtInitials.ClientID %>").value != '')
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtDisplayName.ClientID %>").value + document.getElementById("<%= txtInitials.ClientID %>").value + ' ';
if (document.getElementById("<%= txtInitials.ClientID %>").value != '')
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtDisplayName.ClientID %>").value + document.getElementById("<%= txtInitials.ClientID %>").value + ' ';
if (document.getElementById("<%= txtLastName.ClientID %>").value != '')
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtDisplayName.ClientID %>").value + document.getElementById("<%= txtLastName.ClientID %>").value;
}
</script>
if (document.getElementById("<%= txtLastName.ClientID %>").value != '')
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtDisplayName.ClientID %>").value + document.getElementById("<%= txtLastName.ClientID %>").value;
}
</script>
</div>
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="OrganizationUserAdd48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Create User"></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<table>
<tr>
<td class="FormLabel150"><asp:Localize ID="locFirstName" runat="server" meta:resourcekey="locFirstName" Text="First Name: "></asp:Localize></td>
<td>
<asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100" onKeyUp="buildDisplayName();" ></asp:TextBox>
&nbsp;
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="OrganizationUserAdd48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Create User"></asp:Localize>
</div>
<asp:UpdatePanel ID="CreateUserUpdatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<table>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locFirstName" runat="server" meta:resourcekey="locFirstName" Text="First Name: "></asp:Localize></td>
<td>
<asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox>
&nbsp;
<asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Initials:" />
<asp:TextBox ID="txtInitials" runat="server" MaxLength="6" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox>
</td>
</tr>
<tr>
<td class="FormLabel150"><asp:Localize ID="locLastName" runat="server" meta:resourcekey="locLastName" Text="Last Name: "></asp:Localize></td>
<td>
<asp:TextBox ID="txtLastName" runat="server" CssClass="TextBox200" onKeyUp="buildDisplayName();"></asp:TextBox>
</td>
</tr>
<tr>
<td class="FormLabel150"><asp:Localize ID="locDisplayName" runat="server" meta:resourcekey="locDisplayName" Text="Display Name: *"></asp:Localize></td>
<td>
<asp:TextBox ID="txtDisplayName" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireDisplayName" runat="server" meta:resourcekey="valRequireDisplayName" ControlToValidate="txtDisplayName"
ErrorMessage="Enter Display Name" ValidationGroup="CreateMailbox" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="FormLabel150"><asp:Localize ID="locSubscriberNumber" runat="server" meta:resourcekey="locSubscriberNumber" Text="Account Number: *"></asp:Localize></td>
<td>
<asp:TextBox ID="txtSubscriberNumber" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireSubscriberNumber" runat="server" meta:resourcekey="valRequireSubscriberNumber" ControlToValidate="txtSubscriberNumber"
ErrorMessage="Enter Account Number" ValidationGroup="CreateMailbox" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="FormLabel150"><asp:Localize ID="locAccount" runat="server" meta:resourcekey="locAccount" Text="E-mail Address: *"></asp:Localize></td>
<td>
<wsp:EmailAddress id="email" runat="server" ValidationGroup="CreateMailbox">
</wsp:EmailAddress>
</td>
</tr>
<tr>
<td class="FormLabel150" valign="top"><asp:Localize ID="locPassword" runat="server" meta:resourcekey="locPassword" Text="Password: *"></asp:Localize></td>
<td>
<wsp:PasswordControl id="password" runat="server" ValidationGroup="CreateMailbox" AllowGeneratePassword="true" >
</wsp:PasswordControl>
<asp:CheckBox ID="chkUserMustChangePassword" runat="server" meta:resourcekey="chkUserMustChangePassword" Text="User must change password at next login" />
</td>
</tr>
</table>
<asp:TextBox ID="txtInitials" runat="server" MaxLength="6" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox>
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locLastName" runat="server" meta:resourcekey="locLastName" Text="Last Name: "></asp:Localize></td>
<td>
<asp:TextBox ID="txtLastName" runat="server" CssClass="TextBox200" onKeyUp="buildDisplayName();"></asp:TextBox>
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locDisplayName" runat="server" meta:resourcekey="locDisplayName" Text="Display Name: *"></asp:Localize></td>
<td>
<asp:TextBox ID="txtDisplayName" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireDisplayName" runat="server" meta:resourcekey="valRequireDisplayName" ControlToValidate="txtDisplayName"
ErrorMessage="Enter Display Name" ValidationGroup="CreateMailbox" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locSubscriberNumber" runat="server" meta:resourcekey="locSubscriberNumber" Text="Account Number: *"></asp:Localize></td>
<td>
<asp:TextBox ID="txtSubscriberNumber" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireSubscriberNumber" runat="server" meta:resourcekey="valRequireSubscriberNumber" ControlToValidate="txtSubscriberNumber"
ErrorMessage="Enter Account Number" ValidationGroup="CreateMailbox" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locAccount" runat="server" meta:resourcekey="locAccount" Text="E-mail Address: *"></asp:Localize></td>
<td>
<wsp:EmailAddress id="email" runat="server" ValidationGroup="CreateMailbox">
</wsp:EmailAddress>
</td>
</tr>
<tr>
<td colspan="2">
<wsp:SendToControl id="sendToControl" runat="server" ValidationGroup="CreateMailbox" ControlToHide="PasswordBlock"></wsp:SendToControl>
</td>
</tr>
<tr id="PasswordBlock" runat="server" Visible="false">
<td class="FormLabel150" valign="top">
<asp:Localize ID="locPassword" runat="server" meta:resourcekey="locPassword" Text="Password: *"></asp:Localize></td>
<td>
<wsp:PasswordControl id="password" runat="server" ValidationGroup="CreateMailbox" AllowGeneratePassword="false">
</wsp:PasswordControl>
<asp:CheckBox ID="chkUserMustChangePassword" runat="server" meta:resourcekey="chkUserMustChangePassword" Text="User must change password at next login" Visible="False"/>
</td>
</tr>
</table>
<table>
<tr>
<td class="FormLabel150">
<asp:CheckBox ID="chkSendInstructions" runat="server" meta:resourcekey="chkSendInstructions" Text="Send Setup Instructions" Checked="true" />
</td>
<td><wsp:EmailControl id="sendInstructionEmail" runat="server" RequiredEnabled="true" ValidationGroup="CreateMailbox"></wsp:EmailControl></td>
</tr>
</table>
<div class="FormFooterClean">
<asp:Button id="btnCreate" runat="server" Text="Create Mailbox"
CssClass="Button1" meta:resourcekey="btnCreate" ValidationGroup="CreateMailbox"
OnClick="btnCreate_Click"
OnClientClick="ShowProgressDialog('Creating mailbox...');"></asp:Button>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="CreateMailbox" />
<table>
<tr>
<td class="FormLabel150">
<asp:CheckBox ID="chkSendInstructions" runat="server" meta:resourcekey="chkSendInstructions" Text="Send Setup Instructions" Checked="true" />
</td>
<td>
<wsp:EmailControl id="sendInstructionEmail" runat="server" RequiredEnabled="true" ValidationGroup="CreateMailbox"></wsp:EmailControl></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="FormFooterClean">
<asp:Button ID="btnCreate" runat="server" Text="Create Mailbox"
CssClass="Button1" meta:resourcekey="btnCreate" ValidationGroup="CreateMailbox"
OnClick="btnCreate_Click"
OnClientClick="ShowProgressDialog('Creating user...');"></asp:Button>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="CreateMailbox" />
</div>
</div>
</div>
</div>
</div>

View file

@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Web.Security;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.HostedSolution;
@ -98,10 +99,17 @@ namespace WebsitePanel.Portal.HostedSolution
try
{
var passwordString = password.Password;
if (sendToControl.IsRequestSend)
{
passwordString = Membership.GeneratePassword(16, 3);
}
int accountId = ES.Services.Organizations.CreateUser(PanelRequest.ItemID, txtDisplayName.Text.Trim(),
email.AccountName.ToLower(),
email.DomainName.ToLower(),
password.Password,
passwordString,
txtSubscriberNumber.Text.Trim(),
chkSendInstructions.Checked,
sendInstructionEmail.Text);
@ -119,6 +127,15 @@ namespace WebsitePanel.Portal.HostedSolution
}
}
if (sendToControl.SendEmail)
{
ES.Services.Organizations.SendUserPasswordRequestEmail(PanelRequest.ItemID, accountId, "User creation", sendToControl.Email, true);
}
else if (sendToControl.SendMobile)
{
ES.Services.Organizations.SendUserPasswordRequestSms(PanelRequest.ItemID, accountId, "User creation", sendToControl.Mobile);
}
Response.Redirect(EditUrl("AccountID", accountId.ToString(), "edit_user",
"SpaceID=" + PanelSecurity.PackageId,
"ItemID=" + PanelRequest.ItemID,

View file

@ -48,6 +48,15 @@ namespace WebsitePanel.Portal.HostedSolution {
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// CreateUserUpdatePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel CreateUserUpdatePanel;
/// <summary>
/// messageBox control.
/// </summary>
@ -183,6 +192,24 @@ namespace WebsitePanel.Portal.HostedSolution {
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.EmailAddress email;
/// <summary>
/// sendToControl control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SendToControl sendToControl;
/// <summary>
/// PasswordBlock control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow PasswordBlock;
/// <summary>
/// locPassword control.
/// </summary>

View file

@ -195,7 +195,7 @@ namespace WebsitePanel.Portal
user.SecondaryEmail = txtSecondaryEmail.Text;
user.HtmlMail = ddlMailFormat.SelectedIndex == 1;
user.Username = txtUsername.Text;
user.Password = userPassword.Password;
// user.Password = userPassword.Password;
user.IsDemo = chkDemo.Checked;
user.LoginStatusId = loginStatus.SelectedIndex;
@ -220,7 +220,7 @@ namespace WebsitePanel.Portal
try
{
//int userId = UsersHelper.AddUser(log, PortalId, user);
int userId = PortalUtils.AddUserAccount(log, user, false);
int userId = PortalUtils.AddUserAccount(log, user, false, userPassword.Password);
if (userId < 0)
{

View file

@ -0,0 +1,55 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SettingsUserPasswordRequestLetter.ascx.cs" Inherits="WebsitePanel.Portal.SettingsUserPasswordRequestLetter" %>
<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="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"><asp:Label ID="lblLogoUrl" runat="server" meta:resourcekey="lblLogoUrl" Text="Logo Url:"></asp:Label></td>
<td class="Normal">
<asp:TextBox ID="txtLogoUrl" runat="server" Width="500px" CssClass="NormalTextBox"></asp:TextBox></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>
<tr>
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblSmsBody" runat="server" meta:resourcekey="lblSmsBody" Text="SMS Body:"></asp:Label></td>
</tr>
<tr>
<td class="Normal" colspan="2">
<asp:TextBox ID="txtSmsBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
</tr>
</table>

View file

@ -0,0 +1,37 @@
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 SettingsUserPasswordRequestLetter : WebsitePanelControlBase, IUserSettingsEditorControl
{
public void BindSettings(UserSettings settings)
{
txtFrom.Text = settings["From"];
txtSubject.Text = settings["Subject"];
Utils.SelectListItem(ddlPriority, settings["Priority"]);
txtHtmlBody.Text = settings["HtmlBody"];
txtTextBody.Text = settings["TextBody"];
txtLogoUrl.Text = settings["LogoUrl"];
txtSmsBody.Text = settings["SMSBody"];
}
public void SaveSettings(UserSettings settings)
{
settings["From"] = txtFrom.Text;
settings["Subject"] = txtSubject.Text;
settings["Priority"] = ddlPriority.SelectedValue;
settings["HtmlBody"] = txtHtmlBody.Text;
settings["TextBody"] = txtTextBody.Text;
settings["LogoUrl"] = txtLogoUrl.Text;
settings["SMSBody"] = txtSmsBody.Text;
}
}
}

View file

@ -0,0 +1,141 @@
//------------------------------------------------------------------------------
// <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 SettingsUserPasswordRequestLetter {
/// <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>
/// 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>
/// lblLogoUrl 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 lblLogoUrl;
/// <summary>
/// txtLogoUrl 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 txtLogoUrl;
/// <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;
/// <summary>
/// lblSmsBody 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 lblSmsBody;
/// <summary>
/// txtSmsBody 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 txtSmsBody;
}
}

View file

@ -54,6 +54,10 @@
<asp:HyperLink ID="lnkOrganizationUserPasswordResetPincodeLetter" runat="server" meta:resourcekey="lnkOrganizationUserPasswordResetPincodeLetter"
Text="User Password Reset Pincode Letter" NavigateUrl='<%# GetSettingsLink("UserPasswordResetPincodeLetter", "SettingsUserPasswordResetPincodeLetter") %>'></asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="HyperLink3" runat="server" meta:resourcekey="lnkOrganizationUserPasswordRequestLetter"
Text="Organization User Password Request Letter" NavigateUrl='<%# GetSettingsLink("OrganizationUserPasswordRequestLetter", "SettingsUserPasswordRequestLetter") %>'></asp:HyperLink>
</li>
</ul>
</div>
<div class="FormFooter">

View file

@ -129,6 +129,15 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkOrganizationUserPasswordResetPincodeLetter;
/// <summary>
/// HyperLink3 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 HyperLink3;
/// <summary>
/// btnCancel control.
/// </summary>

View file

@ -0,0 +1,150 @@
<?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="btnResetPassoword.Text" xml:space="preserve">
<value>Send Password Reset Email</value>
</data>
<data name="chkSaveAsMobile.Text" xml:space="preserve">
<value>Save as user mobile</value>
</data>
<data name="locEmailAddress.Text" xml:space="preserve">
<value>Email: *</value>
</data>
<data name="locMobile.Text" xml:space="preserve">
<value>Mobile: *</value>
</data>
<data name="locReason.Text" xml:space="preserve">
<value>Reason:</value>
</data>
<data name="locSendTo.Text" xml:space="preserve">
<value>Send to:</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Reset Password</value>
</data>
<data name="rbtnEmail.Text" xml:space="preserve">
<value>Email</value>
</data>
<data name="rbtnMobile.Text" xml:space="preserve">
<value>Mobile</value>
</data>
<data name="chkSendPasswordResetEmail.Text" xml:space="preserve">
<value>Send Password Request</value>
</data>
</root>

View file

@ -0,0 +1,52 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SendToControl.ascx.cs" Inherits="WebsitePanel.Portal.UserControls.SendToControl" %>
<table id="send-to-table">
<tr>
<td class="FormLabel150"></td>
<td>
<asp:CheckBox ID="chkSendPasswordResetEmail" runat="server" meta:resourcekey="chkSendPasswordResetEmail" Text="Send Password Request" AutoPostBack="true" Checked="True" OnCheckedChanged="chkSendPasswordResetEmail_StateChanged" />
</td>
</tr>
<tbody id="SendToBody" runat="server" visible="False">
<tr>
<td class="FormLabel150">
<asp:Localize ID="locSendTo" runat="server" meta:resourcekey="locSendTo" Text="Send to:"></asp:Localize></td>
<td class="FormRBtnL">
<asp:RadioButton ID="rbtnEmail" runat="server" meta:resourcekey="rbtnEmail" Text="Email" GroupName="SendToGroup" AutoPostBack="true" Checked="true" OnCheckedChanged="SendToGroupCheckedChanged" />
<asp:RadioButton ID="rbtnMobile" runat="server" meta:resourcekey="rbtnMobile" Text="Mobile" GroupName="SendToGroup" AutoPostBack="true" OnCheckedChanged="SendToGroupCheckedChanged" />
<br />
<br />
</td>
</tr>
<tr id="EmailRow" runat="server">
<td class="FormLabel150" valign="top">
<asp:Localize ID="locEmailAddress" runat="server" meta:resourcekey="locEmailAddress"></asp:Localize></td>
<td>
<asp:TextBox runat="server" ID="txtEmailAddress" CssClass="HugeTextBox200" />
<asp:RequiredFieldValidator ID="valEmailAddress" runat="server" ErrorMessage="*" ControlToValidate="txtEmailAddress" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexEmailValid" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="ResetUserPassword" ControlToValidate="txtEmailAddress" ErrorMessage="Invalid Email Format"></asp:RegularExpressionValidator>
</td>
</tr>
<tr id="MobileRow" runat="server" visible="False">
<td class="FormLabel150" valign="top">
<asp:Localize ID="locMobile" runat="server" meta:resourcekey="locMobile"></asp:Localize></td>
<td>
<asp:TextBox runat="server" ID="txtMobile" CssClass="HugeTextBox200" />
<asp:RequiredFieldValidator ID="valMobile" runat="server" ErrorMessage="*" ControlToValidate="txtMobile" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexMobileValid" runat="server" ValidationExpression="^\+?\d+$" ValidationGroup="ResetUserPassword" ControlToValidate="txtMobile" ErrorMessage="Invalid Mobile Format"></asp:RegularExpressionValidator>
</td>
</tr>
</tbody>
</table>
<div runat="server" id="divWrapper">
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$("#send-to-table input").live("click", function (e) {
DisableProgressDialog();
});
});
</script>
</div>

View file

@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebsitePanel.Portal.UserControls
{
public partial class SendToControl : WebsitePanelControlBase
{
public string ValidationGroup
{
get { return valEmailAddress.ValidationGroup; }
set
{
valEmailAddress.ValidationGroup = value;
regexEmailValid.ValidationGroup = value;
valMobile.ValidationGroup = value;
regexMobileValid.ValidationGroup = value;
}
}
public bool IsRequestSend
{
get { return chkSendPasswordResetEmail.Checked; }
}
public bool SendEmail
{
get { return chkSendPasswordResetEmail.Checked && rbtnEmail.Checked; }
}
public bool SendMobile
{
get { return chkSendPasswordResetEmail.Checked && rbtnMobile.Checked; }
}
public string Email
{
get { return txtEmailAddress.Text; }
}
public string Mobile
{
get { return txtMobile.Text; }
}
public string ControlToHide { get; set; }
protected void SendToGroupCheckedChanged(object sender, EventArgs e)
{
EmailRow.Visible = rbtnEmail.Checked;
MobileRow.Visible = !rbtnEmail.Checked;
}
protected void chkSendPasswordResetEmail_StateChanged(object sender, EventArgs e)
{
SendToBody.Visible = chkSendPasswordResetEmail.Checked;
if (!string.IsNullOrEmpty(ControlToHide))
{
var control = Parent.FindControl(ControlToHide);
if (control != null)
{
control.Visible = !chkSendPasswordResetEmail.Checked;
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
var isTwilioEnabled = ES.Services.System.CheckIsTwilioEnabled();
rbtnMobile.Visible = isTwilioEnabled;
if (!Page.IsPostBack)
{
if (isTwilioEnabled)
{
rbtnMobile.Checked = true;
rbtnEmail.Checked = false;
SendToGroupCheckedChanged(null, null);
}
chkSendPasswordResetEmail_StateChanged(null, null);
}
}
}
}

View file

@ -0,0 +1,159 @@
//------------------------------------------------------------------------------
// <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.UserControls {
public partial class SendToControl {
/// <summary>
/// chkSendPasswordResetEmail 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 chkSendPasswordResetEmail;
/// <summary>
/// SendToBody control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl SendToBody;
/// <summary>
/// locSendTo 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.Localize locSendTo;
/// <summary>
/// rbtnEmail 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.RadioButton rbtnEmail;
/// <summary>
/// rbtnMobile 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.RadioButton rbtnMobile;
/// <summary>
/// EmailRow control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow EmailRow;
/// <summary>
/// locEmailAddress 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.Localize locEmailAddress;
/// <summary>
/// txtEmailAddress 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 txtEmailAddress;
/// <summary>
/// valEmailAddress 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.RequiredFieldValidator valEmailAddress;
/// <summary>
/// regexEmailValid 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.RegularExpressionValidator regexEmailValid;
/// <summary>
/// MobileRow control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow MobileRow;
/// <summary>
/// locMobile 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.Localize locMobile;
/// <summary>
/// txtMobile 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 txtMobile;
/// <summary>
/// valMobile 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.RequiredFieldValidator valMobile;
/// <summary>
/// regexMobileValid 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.RegularExpressionValidator regexMobileValid;
/// <summary>
/// divWrapper control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divWrapper;
}
}

View file

@ -103,7 +103,7 @@ namespace WebsitePanel.Portal
user.SecondaryEmail = txtSecondaryEmail.Text;
user.HtmlMail = ddlMailFormat.SelectedIndex == 1;
user.Username = txtUsername.Text.Trim();
user.Password = userPassword.Password;
// user.Password = userPassword.Password;
// contact info
user.CompanyName = contact.CompanyName;
@ -123,7 +123,7 @@ namespace WebsitePanel.Portal
try
{
//int userId = UsersHelper.AddUser(log, PortalId, user);
int userId = PortalUtils.AddUserAccount(log, user, chkAccountLetter.Checked);
int userId = PortalUtils.AddUserAccount(log, user, chkAccountLetter.Checked, userPassword.Password);
if (userId == BusinessErrorCodes.ERROR_INVALID_USER_NAME)
{

View file

@ -206,23 +206,7 @@ namespace WebsitePanel.Portal
{
lblSharedIP.Text = string.Format("({0})", ipsGeneral[0].ExternalIP);
}
else
{
string[] settings = ES.Services.Servers.GetServiceSettings(site.ServiceId);
foreach (string setting in settings)
{
int idx = setting.IndexOf('=');
string option = setting.Substring(0, idx);
if (String.Compare(option, "publicsharedip", true) == 0)
{
string res = setting.Substring(idx + 1);
if (!String.IsNullOrEmpty(res))
lblSharedIP.Text = string.Format("({0})", res);
break;
}
}
}
lblSharedIP.Visible = !String.IsNullOrEmpty(lblSharedIP.Text);
lblSharedIP.Visible = generalIPExists;
}
dedicatedIP.Visible = site.IsDedicatedIP;

View file

@ -339,6 +339,20 @@
<Compile Include="RDS\RDSImportCollection.ascx.designer.cs">
<DependentUpon>RDSImportCollection.ascx</DependentUpon>
</Compile>
<Compile Include="SettingsUserPasswordRequestLetter.ascx.cs">
<DependentUpon>SettingsUserPasswordRequestLetter.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SettingsUserPasswordRequestLetter.ascx.designer.cs">
<DependentUpon>SettingsUserPasswordRequestLetter.ascx</DependentUpon>
</Compile>
<Compile Include="UserControls\SendToControl.ascx.cs">
<DependentUpon>SendToControl.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="UserControls\SendToControl.ascx.designer.cs">
<DependentUpon>SendToControl.ascx</DependentUpon>
</Compile>
<Compile Include="VpsMenu.ascx.cs">
<DependentUpon>VpsMenu.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -4909,6 +4923,8 @@
<Content Include="HostedSharePoint\HostedSharePointEnterpriseStorageSettings.ascx" />
<Content Include="HostedSharePoint\HostedSharePointEnterpriseStorageUsage.ascx" />
<Content Include="RDS\RDSImportCollection.ascx" />
<Content Include="SettingsUserPasswordRequestLetter.ascx" />
<Content Include="UserControls\SendToControl.ascx" />
<Content Include="VpsMenu.ascx" />
<Content Include="ProviderControls\HyperV2012R2_Settings.ascx" />
<Content Include="SearchObject.ascx" />
@ -5034,6 +5050,9 @@
<Content Include="App_LocalResources\VpsMenu.ascx.resx">
<SubType>Designer</SubType>
</Content>
<Content Include="App_LocalResources\SettingsUserPasswordRequestLetter.ascx.resx">
<SubType>Designer</SubType>
</Content>
<EmbeddedResource Include="RDS\App_LocalResources\RDSEditCollectionSettings.ascx.resx" />
<Content Include="RDSServersEditServer.ascx" />
<Content Include="RDS\AssignedRDSServers.ascx" />
@ -5234,6 +5253,7 @@
<Content Include="UserControls\App_LocalResources\MailAccountActions.ascx.resx" />
<Content Include="ScheduleTaskControls\App_LocalResources\UserPasswordExpirationNotificationView.ascx.resx" />
<Content Include="SkinControls\App_LocalResources\SearchObject.ascx.resx" />
<Content Include="UserControls\App_LocalResources\SendToControl.ascx.resx" />
<EmbeddedResource Include="UserControls\App_LocalResources\WebsiteActions.ascx.resx" />
<Content Include="VPS\UserControls\App_LocalResources\Generation.ascx.resx">
<SubType>Designer</SubType>