Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

212 lines
6.1 KiB

  1. <!-- ############################################################################ -->
  2. <!-- ## UDDI Services ## -->
  3. <!-- ## Copyright (c) Microsoft Corporation. All rights reserved. ## -->
  4. <!-- ############################################################################ -->
  5. <%@ Page Language='C#' Inherits='UDDI.Web.UddiPage' %>
  6. <%@ Register TagPrefix='uddi' Namespace='UDDI.Web' Assembly='uddi.web' %>
  7. <%@ Register Tagprefix='uddi' Tagname='Header' Src='../controls/header.ascx' %>
  8. <%@ Register Tagprefix='uddi' Tagname='Footer' Src='../controls/footer.ascx' %>
  9. <%@ Register Tagprefix='uddi' Tagname='PublisherSelector' Src='../controls/publisherselector.ascx' %>
  10. <%@ Register Tagprefix='uddi' Tagname='BreadCrumb' Src='../controls/breadcrumb.ascx' %>
  11. <%@ Import Namespace='System.Data' %>
  12. <%@ Import Namespace='UDDI' %>
  13. <%@ Import Namespace='UDDI.API' %>
  14. <%@ Import Namespace='UDDI.API.Business' %>
  15. <%@ Import Namespace='UDDI.API.ServiceType' %>
  16. <script language='C#' runat='server'>
  17. protected bool frames = false;
  18. protected void Page_Init( object sender, EventArgs e )
  19. {
  20. frames = ( "true" == Request[ "frames" ] );
  21. breadcrumb.AddBlurb( Localization.GetString( "HEADING_IMPERSONATE" ), null, null, null, false );
  22. breadcrumb.AddBlurb( Localization.GetString( "HEADING_EDIT" ), "../edit/edit.aspx?frames=" + ( frames ? "true" : "false" ), null, null, true );
  23. impersonate.Text = Localization.GetString( "BUTTON_IMPERSONATE" );
  24. cancel.Text = Localization.GetString( "BUTTON_CANCEL" );
  25. }
  26. protected void Page_Load( object sender, EventArgs e )
  27. {
  28. if( null != Request[ "cancel" ] )
  29. {
  30. ViewAsPublisher.Reset();
  31. if( frames )
  32. {
  33. Response.Write( ClientScripts.ReloadTop( "../edit/default.aspx" ) );
  34. Response.End();
  35. }
  36. else
  37. {
  38. Response.Redirect( "../edit/default.aspx" );
  39. }
  40. }
  41. else if( null != Request[ "user" ] )
  42. {
  43. searchPanel.Visible = false;
  44. confirmPanel.Visible = true;
  45. }
  46. }
  47. protected void Selector_OnSelect( object sender, string key, string name )
  48. {
  49. this.key.Text = key;
  50. this.name.Text = name;
  51. searchPanel.Visible = false;
  52. confirmPanel.Visible = true;
  53. }
  54. protected void Cancel_OnClick( object sender, EventArgs e )
  55. {
  56. searchPanel.Visible = true;
  57. confirmPanel.Visible = false;
  58. }
  59. protected void Impersonate_OnClick( object sender, EventArgs e )
  60. {
  61. if( false == ViewAsPublisher.Set( key.Text ) )
  62. {
  63. throw new UDDIException( ErrorType.E_unknownUser, "ERROR_IMPERSONATE_NOTADMIN" );
  64. }
  65. if( frames )
  66. {
  67. Response.Write( ClientScripts.ReloadTop( "../edit/default.aspx" ) );
  68. Response.End();
  69. }
  70. else
  71. {
  72. Response.Redirect( "../edit/default.aspx" );
  73. }
  74. }
  75. protected void Return_Click( object sender, EventArgs e )
  76. {
  77. if( frames )
  78. {
  79. Response.Write( ClientScripts.ReloadTop( "../edit/default.aspx" ) );
  80. Response.End();
  81. }
  82. else
  83. {
  84. Response.Redirect( "../edit/default.aspx" );
  85. }
  86. }
  87. </script>
  88. <uddi:StyleSheetControl
  89. Runat='server'
  90. Default='../stylesheets/uddi.css'
  91. Downlevel='../stylesheets/uddidl.css'
  92. />
  93. <uddi:PageStyleControl
  94. Runat='server'
  95. OnClientContextMenu='Document_OnContextMenu()'
  96. Title="TITLE"
  97. AltTitle="TITLE_ALT"
  98. />
  99. <uddi:ClientScriptRegister
  100. Runat='server'
  101. Source='../client.js'
  102. Language='javascript'
  103. />
  104. <uddi:SecurityControl
  105. CoordinatorRequired='true'
  106. Runat='server'
  107. />
  108. <form enctype='multipart/form-data' Runat='server'>
  109. <table width='100%' border='0' height='100%' cellpadding='0' cellspacing='0'>
  110. <asp:PlaceHolder
  111. Id='HeaderBag'
  112. Runat='server'
  113. >
  114. <tr height='95'>
  115. <td>
  116. <!-- Header Control Here -->
  117. <uddi:Header
  118. Runat='server'
  119. />
  120. </td>
  121. </tr>
  122. </asp:PlaceHolder>
  123. <tr height='100%' valign='top'>
  124. <td>
  125. <uddi:BreadCrumb
  126. Id='breadcrumb'
  127. Runat='server'
  128. />
  129. <table cellpadding='10' cellspacing='0' border='0' width='100%'>
  130. <tr>
  131. <td>
  132. <uddi:UddiLabel Text='[[HELP_BLOCK_ADMIN_IMPERSONATE]]' CssClass='helpBlock' Runat='server' /><br>
  133. <br>
  134. <uddi:TabControl id='tabs' Runat='server'>
  135. <uddi:TabPage Name='TAB_IMPERSONATE' Runat='server'>
  136. <table border='0' width='100%' cellpadding='0' cellspacing='0'>
  137. <tr>
  138. <td>
  139. <uddi:UddiLabel Text='[[HELP_BLOCK_ADMIN_IMPERSONATE_DETAILS]]' CssClass='tabHelpBlock' Runat='server' /></td>
  140. <td align='right'>
  141. <uddi:HelpControl HelpFile='coordinate.context.impersonateuser' Runat='server'/></td>
  142. </tr>
  143. </table>
  144. <br>
  145. <div align='right'><uddi:UddiButton Width='100px' Runat='server' CausesValidation='false' id='returnButton' Text='[[BUTTON_CANCEL]]' OnClick='Return_Click' /></div>
  146. <br>
  147. <asp:Panel ID='searchPanel' Runat='server'>
  148. <uddi:PublisherSelector
  149. ID='selector'
  150. OnSelect='Selector_OnSelect'
  151. Runat='server' />
  152. </asp:Panel>
  153. <asp:Panel ID='confirmPanel' Visible='false' Runat='server'>
  154. <hr>
  155. <uddi:UddiLabel Text='[[TEXT_CONFIRM_IMPERSONATION]]' Runat='server' /><br>
  156. <br>
  157. <uddi:UddiLabel Text='[[TAG_IMPERSONATE_USER]]' CssClass='header' Runat='server' /><br>
  158. <asp:Label ID='name' Runat='server' /><br>
  159. <asp:Label ID='key' Visible='false' Runat='server' /><br>
  160. <br>
  161. <uddi:UddiButton
  162. ID='impersonate'
  163. OnClick='Impersonate_OnClick'
  164. Focus='true'
  165. Runat='server' />
  166. <asp:Button
  167. ID='cancel'
  168. OnClick='Cancel_OnClick'
  169. Runat='server' />
  170. </asp:Panel>
  171. </uddi:TabPage>
  172. </uddi:TabControl>
  173. </td>
  174. </tr>
  175. </table>
  176. </td>
  177. </tr>
  178. <asp:PlaceHolder
  179. Id='FooterBag'
  180. Runat='server'
  181. >
  182. <tr height='95'>
  183. <td>
  184. <!-- Footer Control Here -->
  185. <uddi:Footer
  186. Runat='server'
  187. />
  188. </td>
  189. </tr>
  190. </asp:PlaceHolder>
  191. </table>
  192. </form>