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.

252 lines
5.9 KiB

  1. <%@ Page Language='C#' Inherits='UDDI.Web.UddiPage' %>
  2. <%@ Register TagPrefix='uddi' Namespace='UDDI.Web' Assembly='uddi.web' %>
  3. <%@ Import Namespace='UDDI' %>
  4. <%@ Import Namespace='UDDI.Web' %>
  5. <script language='C#' runat='server'>
  6. protected bool frames;
  7. protected string key;
  8. protected void Page_Init( object sender, EventArgs e )
  9. {
  10. frames = ( "true" == Request[ "frames" ] );
  11. key = Request[ "key" ];
  12. if( null == key )
  13. key = "_root";
  14. }
  15. protected void Page_Load( object sender, EventArgs e )
  16. {
  17. //
  18. // Root Node
  19. //
  20. TreeNode nodeCoordinate = tree.Nodes.Add(
  21. Localization.GetString( "HEADING_COORDINATE" ),
  22. "_root",
  23. "../images/coordinate.gif" );
  24. nodeCoordinate.OnClick = "TreeNode_OnSelect( [[node]], '../admin/admin.aspx?frames=true' )";
  25. nodeCoordinate.Tooltip = Localization.GetString( "TOOLTIP_COORDINATE" );
  26. if( key=="_root" )
  27. {
  28. nodeCoordinate.Expand();
  29. nodeCoordinate.Select();
  30. }
  31. //
  32. // Category Node
  33. //
  34. TreeNode nodeCategorization = nodeCoordinate.Nodes.Add(
  35. Localization.GetString( "HEADING_CATEGORIZATION" ),
  36. "_categorization",
  37. "../images/tmodels.gif" );
  38. nodeCategorization.OnClick = "TreeNode_OnSelect( [[node]], '../admin/categorization.aspx?frames=true' )";
  39. nodeCategorization.Tooltip = Localization.GetString( "TOOLTIP_COORDINATE_CATSCHEMES" );
  40. if( key=="_categorization" )
  41. {
  42. nodeCategorization.Expand();
  43. nodeCategorization.Select();
  44. }
  45. //
  46. // Statistics Node
  47. //
  48. TreeNode nodeStatistics = nodeCoordinate.Nodes.Add(
  49. Localization.GetString( "HEADING_STATISTICS" ),
  50. "_statistics",
  51. "../images/tmodels.gif" );
  52. nodeStatistics.OnClick = "TreeNode_OnSelect( [[node]], '../admin/statistics.aspx?frames=true' )";
  53. nodeStatistics.Tooltip = Localization.GetString( "TOOLTIP_COORDINATE_STATISTICS" );
  54. if( key=="_statistics" )
  55. {
  56. nodeStatistics.Expand();
  57. nodeStatistics.Select();
  58. }
  59. if( UDDI.Context.User.IsAdministrator )
  60. {
  61. //
  62. // Data Import Node
  63. //
  64. TreeNode nodeDataImport = nodeCoordinate.Nodes.Add(
  65. Localization.GetString( "HEADING_TAXONOMY" ),
  66. "_dataimport",
  67. "../images/tmodels.gif" );
  68. nodeDataImport.OnClick = "TreeNode_OnSelect( [[node]], '../admin/taxonomy.aspx?frames=true' )";
  69. nodeDataImport.Tooltip = Localization.GetString( "TOOLTIP_COORDINATE_DATA_IMPORT" );
  70. if( key=="_dataimport" )
  71. {
  72. nodeDataImport.Expand();
  73. nodeDataImport.Select();
  74. }
  75. }
  76. }
  77. </script>
  78. <html>
  79. <head>
  80. <title><uddi:StringResource Name='TITLE' Runat='server' /></title>
  81. <link href='../stylesheets/uddi.css' rel='stylesheet' type='text/css'>
  82. <script language='javascript' src='../client.js'></script>
  83. </head>
  84. <body
  85. oncontextmenu='Document_OnContextMenu()'
  86. class='explorerFrame'
  87. style='padding: 5px'>
  88. <form runat='server'>
  89. <uddi:SecurityControl CoordinatorRequired='true' Runat='server' />
  90. <uddi:TreeView ID='tree' Runat='Server' />
  91. <input type='hidden' id='key' name='key' value='<%=key%>'>
  92. </form>
  93. <script language='javascript'>
  94. var markedNode = null;
  95. function Window_OnClick()
  96. {
  97. HideAnyPopups();
  98. SelectNode( selectedNode );
  99. }
  100. function Window_OnContextMenu()
  101. {
  102. var e = window.event;
  103. HideAnyPopups();
  104. SelectNode( selectedNode );
  105. e.cancelBubble = true;
  106. e.returnValue = false;
  107. }
  108. function Window_OnKeyPress()
  109. {
  110. var e = window.event;
  111. if( 27 == e.keyCode )
  112. {
  113. HideAnyPopups();
  114. SelectNode( selectedNode );
  115. }
  116. }
  117. function Window_OnLoad()
  118. {
  119. var url = window.location.toString();
  120. if( url.indexOf( "#top" ) < 0 )
  121. window.location = url + "#top";
  122. }
  123. function MarkNode( node )
  124. {
  125. if( null != selectedNode )
  126. selectedNode.className = "node";
  127. if( null != markedNode )
  128. markedNode.className = "node";
  129. if( null != node )
  130. node.className = "selected";
  131. markedNode = node;
  132. }
  133. function SelectNode( node )
  134. {
  135. var keyField = window.document.getElementById( "key" );
  136. if( null != keyField )
  137. keyField.value = node.key;
  138. MarkNode( node );
  139. selectedNode = node;
  140. }
  141. function ConcatUrl( url, args )
  142. {
  143. if( null != args )
  144. {
  145. if( url.indexOf( "?" ) < 0 )
  146. return url + "?" + args;
  147. else
  148. return url + "&" + args;
  149. }
  150. return url;
  151. }
  152. function ViewGoto( url, args )
  153. {
  154. window.parent.frames[ "view" ].location = ConcatUrl( url, args );
  155. }
  156. function ContextMenu_OnAdd( url )
  157. {
  158. SelectNode( popupNode );
  159. ViewGoto( url, popupArgs );
  160. }
  161. function ContextMenu_OnDelete( url )
  162. {
  163. SelectNode( popupNode );
  164. ViewGoto( url, popupArgs );
  165. }
  166. function ContextMenu_OnEdit( url )
  167. {
  168. SelectNode( popupNode );
  169. ViewGoto( url, popupArgs );
  170. }
  171. function ContextMenu_OnView( url )
  172. {
  173. SelectNode( popupNode );
  174. ViewGoto( url, popupArgs );
  175. }
  176. function ContextMenu_OnChangeOwner( url )
  177. {
  178. SelectNode( popupNode );
  179. ViewGoto( url, popupArgs )
  180. }
  181. function ContextMenu_OnRefresh()
  182. {
  183. document.forms[ 0 ].submit();
  184. }
  185. function ContextMenu_OnImpersonateUser()
  186. {
  187. SelectNode( popupNode );
  188. ViewGoto( "../admin/impersonate.aspx?frames=true", null );
  189. }
  190. function ContextMenu_OnCancelImpersonateUser()
  191. {
  192. SelectNode( popupNode );
  193. ViewGoto( "../admin/impersonate.aspx?frames=true&cancel=true", null );
  194. }
  195. function TreeNode_OnContextMenu( node, menu, args )
  196. {
  197. MarkNode( node );
  198. ShowContextMenu( node, menu, args );
  199. }
  200. function TreeNode_OnSelect( node, url )
  201. {
  202. SelectNode( node );
  203. ViewGoto( url, null );
  204. }
  205. </script>
  206. </body>
  207. </html>