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.

227 lines
6.7 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' Tagname='Header' Src='../controls/header.ascx' %>
  7. <%@ Register Tagprefix='uddi' Tagname='Footer' Src='../controls/footer.ascx' %>
  8. <%@ Register TagPrefix='uddi' Tagname='BreadCrumb' Src='../controls/breadcrumb.ascx' %>
  9. <%@ Register TagPrefix='uddi' Tagname='BusinessControl' Src='../controls/businesses.ascx' %>
  10. <%@ Register TagPrefix='uddi' Tagname='TModelControl' Src='../controls/tmodels.ascx' %>
  11. <%@ Register TagPrefix='uddi' Namespace='UDDI.Web' Assembly='uddi.web' %>
  12. <%@ Import Namespace='System.Data' %>
  13. <%@ Import Namespace='UDDI' %>
  14. <%@ Import Namespace='UDDI.API' %>
  15. <%@ Import Namespace='UDDI.API.Business' %>
  16. <%@ Import Namespace='UDDI.API.ServiceType' %>
  17. <%@ Import Namespace='UDDI.Web' %>
  18. <script language='c#' runat='server'>
  19. protected bool frames = false;
  20. protected void Page_Init( object sender, EventArgs e )
  21. {
  22. frames = ( "true" == Request[ "frames" ] );
  23. }
  24. protected void Page_Load( object sender, EventArgs e )
  25. {
  26. BusinessInfoCollection businessInfos = new BusinessInfoCollection();
  27. businessInfos.GetForCurrentPublisher();
  28. businessInfos.Sort();
  29. businesses.Initialize( businessInfos, true );
  30. TModelInfoCollection tModelInfos = new TModelInfoCollection();
  31. tModelInfos.GetForCurrentPublisher();
  32. //
  33. // Remove hidden tModels.
  34. //
  35. int i = 0;
  36. while( i < tModelInfos.Count )
  37. {
  38. if( tModelInfos[ i ].IsHidden )
  39. tModelInfos.RemoveAt( i );
  40. else
  41. i ++;
  42. }
  43. tModelInfos.Sort();
  44. tModels.Initialize( tModelInfos, true );
  45. if( !Page.IsPostBack )
  46. tabs.SelectedIndex = Convert.ToInt32( Request[ "tab" ] );
  47. coordinatorBox.Visible = UDDI.Context.User.IsCoordinator;
  48. stopImpersonate.Visible = UDDI.Context.User.IsImpersonated;
  49. if( null!=Request[ "refreshExplorer" ] && frames )
  50. {
  51. Response.Write(
  52. ClientScripts.ReloadExplorerPane( "_root" )
  53. );
  54. }
  55. }
  56. protected void Page_PreRender( object sender, EventArgs e )
  57. {
  58. if( UDDI.Context.User.IsImpersonated )
  59. breadcrumb.AddBlurb( String.Format( Localization.GetString( "HEADING_ENTRIES" ), UDDI.Context.User.ID ), null, "others_uddi.gif", null, false );
  60. else
  61. breadcrumb.AddBlurb( Localization.GetString( "HEADING_MY_ENTRIES" ), null, "my_uddi.gif", null, false );
  62. }
  63. protected void Impersonate_Command( object sender, CommandEventArgs e )
  64. {
  65. switch( e.CommandName )
  66. {
  67. case "impersonate":
  68. Response.Redirect( Root + "/admin/impersonate.aspx?frames=" + ( (frames)?"true":"false" ) );
  69. break;
  70. case "stopImpersonate":
  71. Response.Redirect( Root + "/admin/impersonate.aspx?frames=" + ( (frames)?"true":"false" )+ "&cancel=true" );
  72. break;
  73. }
  74. }
  75. </script>
  76. <uddi:StyleSheetControl
  77. Runat='server'
  78. Default='../stylesheets/uddi.css'
  79. Downlevel='../stylesheets/uddidl.css'
  80. />
  81. <uddi:PageStyleControl
  82. Runat='server'
  83. OnClientContextMenu='Document_OnContextMenu()'
  84. Title="TITLE"
  85. AltTitle="TITLE_ALT"
  86. />
  87. <uddi:ClientScriptRegister
  88. Runat='server'
  89. Source='../client.js'
  90. Language='javascript'
  91. />
  92. <uddi:SecurityControl
  93. PublisherRequired='true'
  94. Runat='server'
  95. />
  96. <form runat='server'>
  97. <table width='100%' border='0' height='100%' cellpadding='0' cellspacing='0'>
  98. <asp:PlaceHolder
  99. Id='HeaderBag'
  100. Runat='server'
  101. >
  102. <tr height='95'>
  103. <td>
  104. <!-- Header Control Here -->
  105. <uddi:Header
  106. Runat='server'
  107. />
  108. </td>
  109. </tr>
  110. </asp:PlaceHolder>
  111. <tr height='100%' valign='top'>
  112. <td>
  113. <uddi:BreadCrumb
  114. Id='breadcrumb'
  115. Runat='server'
  116. />
  117. <table cellpadding='10' cellspacing='0' border='0' width='100%'>
  118. <tr>
  119. <td>
  120. <uddi:ContentController
  121. Mode = 'Public'
  122. Runat='server'
  123. >
  124. <uddi:UddiLabel
  125. Text='[[HELP_BLOCK_PUBLISH_ALT]]'
  126. CssClass='helpBlock'
  127. Runat='server'
  128. />
  129. </uddi:ContentController>
  130. <uddi:ContentController
  131. Mode = 'Private'
  132. Runat='server'
  133. >
  134. <uddi:UddiLabel
  135. Text='[[HELP_BLOCK_PUBLISH]]'
  136. CssClass='helpBlock'
  137. Runat='server'
  138. />
  139. </uddi:ContentController>
  140. <br>
  141. <br>
  142. <uddi:TabControl ID='tabs' Runat='server'>
  143. <uddi:TabPage Name='TAB_MY_UDDI' Runat='server'>
  144. <uddi:ContextualHelpControl
  145. Runat='Server'
  146. Text='[[HELP_BLOCK_MY_UDDI]]'
  147. HelpFile='publish.context.publish'
  148. CssClass='tabHelpBlock'
  149. BorderWidth='0'
  150. />
  151. <br>
  152. <uddi:Box ID='coordinatorBox' Visible='false' Runat='server'>
  153. <uddi:UddiLabel Text='[[TEXT_MY_UDDI_IMPERSONATE]]' CssClass='tabHelpBlock' Runat='server' /><br>
  154. <br>
  155. <uddi:UddiButton OnCommand='Impersonate_Command' CommandName='impersonate' ID='impersonate' Text='[[BUTTON_MY_UDDI_IMPERSONATE]]' Runat='server' />&nbsp;
  156. <uddi:UddiButton OnCommand='Impersonate_Command' CommandName='stopImpersonate' ID='stopImpersonate' Text='[[BUTTON_MY_UDDI_MY_DATA]]' Runat='server' />
  157. </uddi:Box>
  158. </uddi:TabPage>
  159. <uddi:TabPage Name='TAB_BUSINESSES' Runat='server'>
  160. <uddi:ContextualHelpControl
  161. Runat='Server'
  162. Text='[[HELP_BLOCK_PUBLISH_PROVIDERS]]'
  163. HelpFile='publish.context.publishproviders'
  164. CssClass='tabHelpBlock'
  165. BorderWidth='0'
  166. />
  167. <br>
  168. <uddi:BusinessControl ID='businesses' Runat='server' />
  169. </uddi:TabPage>
  170. <uddi:TabPage Name='TAB_TMODELS' Runat='server'>
  171. <uddi:ContextualHelpControl
  172. Runat='Server'
  173. Text='[[HELP_BLOCK_PUBLISH_TMODELS]]'
  174. HelpFile='publish.context.publishtmodels'
  175. CssClass='tabHelpBlock'
  176. BorderWidth='0'
  177. />
  178. <br>
  179. <uddi:TModelControl ID='tModels' Runat='server' />
  180. </uddi:TabPage>
  181. </uddi:TabControl>
  182. </td>
  183. </tr>
  184. </table>
  185. </td>
  186. </tr>
  187. <asp:PlaceHolder
  188. Id='FooterBag'
  189. Runat='server'
  190. >
  191. <tr height='95'>
  192. <td>
  193. <!-- Footer Control Here -->
  194. <uddi:Footer
  195. Runat='server'
  196. />
  197. </td>
  198. </tr>
  199. </asp:PlaceHolder>
  200. </table>
  201. </form>