Subversion Repositories DevTools

Rev

Rev 64 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 64 Rev 66
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'|                                                   |
4
'|                                                   |
5
'|		          RequestProductLocation		 	 |
5
'|                RequestProductLocation             |
6
'|                                                   |
6
'|                                                   |
7
'=====================================================
7
'=====================================================
8
%>
8
%>
9
<%
9
<%
10
Option explicit
10
Option explicit
Line 13... Line 13...
13
<!--#include file="common/globals.asp"-->
13
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/config.asp"-->
14
<!--#include file="common/config.asp"-->
15
<!--#include file="common/common_subs.asp"-->
15
<!--#include file="common/common_subs.asp"-->
16
<%
16
<%
17
'------------ VARIABLE DEFINITION -------------
17
'------------ VARIABLE DEFINITION -------------
18
Dim rsQry
-
 
19
Dim IsProductInNewBom
18
Dim IsProductInNewBom
20
Dim bgColor
-
 
21
Dim QueryName
19
Dim QueryName
-
 
20
 
-
 
21
' parameters refering to production BOM items
22
Dim parBomId
22
Dim parProdBomId
23
Dim objWSH
23
Dim parProdBomProdId
-
 
24
 
24
Dim rsPkg, pkgName, pkgVersion, pkgId
25
' parameters refering this BOM items
-
 
26
Dim parThisBomId
25
Dim rsProj, projName, branchName
27
Dim parThisProdId
26
Dim rsOS, OSName
28
Dim parThisPkgId
-
 
29
Dim parThisVersion
-
 
30
 
27
'------------ CONSTANTS DECLARATION -----------
31
'------------ CONSTANTS DECLARATION -----------
28
'------------ VARIABLE INIT -------------------
32
'------------ VARIABLE INIT -------------------
29
parBomId = Request("bom_id")
33
parProdBomId     = Request("bom_id")
-
 
34
parProdBomProdId = Request("prod_id")
-
 
35
 
-
 
36
parThisBomId     = Request("compare_bom_id")
-
 
37
parThisProdId    = Request("new_prod_id")
-
 
38
parThisPkgId     = Request("pkg_id")
-
 
39
parThisVersion   = Request("new_version")
-
 
40
 
30
'------------ CONDITIONS ----------------------
41
'------------ CONDITIONS ----------------------
31
'----------------------------------------------
42
'----------------------------------------------
32
%>
43
%>
33
<%
44
<%
34
'--------------------------------------------------------------------------------------------------------------
45
'--------------------------------------------------------------------------------------------------------------
35
'--------------------------------------------------------------------------------------------------------------
46
'--------------------------------------------------------------------------------------------------------------
36
%>
47
%>
37
<%
48
<%
38
'------------ RUN BEFORE PAGE RENDER ----------
49
'------------ RUN BEFORE PAGE RENDER ----------
39
'If (Request("change_type") = "R") Then
50
'If (Request("change_type") = "R") Then
40
'	QueryName = "BomRemovedProductLocation.sql"
51
'   QueryName = "BomRemovedProductLocation.sql"
41
'	IsProductInNewBom = FALSE
52
'   IsProductInNewBom = FALSE
42
	
53
 
43
'ElseIf (Request("change_type") = "U") Then
54
'ElseIf (Request("change_type") = "U") Then
44
'	QueryName = "BomUpdatedProductLocation.sql"
55
'   QueryName = "BomUpdatedProductLocation.sql"
45
'	IsProductInNewBom = FALSE
56
'   IsProductInNewBom = FALSE
46
'Else
57
'Else
47
	
58
 
48
	QueryName = "BomAddedProductLocation.sql"
59
   QueryName = "BomAddedProductLocation.sql"
49
'	IsProductInNewBom = TRUE
60
'   IsProductInNewBom = TRUE
50
	
61
 
51
'End If
62
'End If
52
'----------------------------------------------
63
'----------------------------------------------
53
%>
64
%>
54
 
65
 
55
		
66
 
56
		<table width="100%"  border="0" cellspacing="3" cellpadding="0">
67
<table width="100%"  border="0" cellspacing="3" cellpadding="0">
57
        <tr>
68
   <tr>
58
			<td background="images/bg_form_lightgray.gif" nowrap class="body_txt">
69
      <td background="images/bg_form_lightgray.gif" nowrap class="body_txt">
59
			<SPAN id="IMG_EXPAND_PROD_<%=Request("new_prod_id")%>" style="display:block;"><a href="javascript:;" class="menu_link" onClick="RequestProductNotes('?prod_id=<%=Request("prod_id")%>&new_prod_id=<%=request("new_prod_id")%>', '<%=Request("new_prod_id")%>');"><img src="icons/i_plus.gif" border="0" align="absmiddle" hspace="3"><img src="icons/i_product.gif" border="0" align="absmiddle" hspace="3">Product Notes</a></SPAN>							
70
         <SPAN id="IMG_EXPAND_PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>" style="display:block;">
60
			<SPAN id="IMG_COLLAPSE_PROD_<%=Request("new_prod_id")%>" style="display:none;"><a href="javascript:;" class="menu_link" onClick="ToggleDisplay( 'PROD_<%=Request("new_prod_id")%>', 'IMG_EXPAND_PROD_<%=Request("new_prod_id")%>', 'IMG_COLLAPSE_PROD_<%=Request("new_prod_id")%>');"><img src="icons/i_minus.gif" border="0" align="absmiddle" hspace="3"><img src="icons/i_product.gif" border="0" align="absmiddle" hspace="3">Product Notes</a></SPAN>
71
            <a href="javascript:;" class="menu_link" onClick="RequestProductNotes('?prod_id=<%=parProdBomProdId%>&new_prod_id=<%=parThisProdId%>', '<%=parThisBomId%>_<%=parThisProdId%>');">
61
			</td>
72
               <img src="icons/i_plus.gif" border="0" align="absmiddle" hspace="3">
62
		</tr>	
73
               <img src="icons/i_product.gif" border="0" align="absmiddle" hspace="3">Product Notes
63
		<tr>
74
            </a>
64
	    	<td nowrap valign="top" class="body_row" colspan="3">
75
         </SPAN>
65
			<DIV id="PROD_<%=Request("new_prod_id")%>" name="PROD_<%=Request("new_prod_id")%>" style="display:none;"><%=enumLOADING%></DIV>
76
         <SPAN id="IMG_COLLAPSE_PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>" style="display:none;">
66
			</td>
77
            <a href="javascript:;" class="menu_link" onClick="ToggleDisplay( 'PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>', 'IMG_EXPAND_PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>', 'IMG_COLLAPSE_PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>');">
67
	    </tr>	
78
               <img src="icons/i_minus.gif" border="0" align="absmiddle" hspace="3">
68
          <%
79
               <img src="icons/i_product.gif" border="0" align="absmiddle" hspace="3">Product Notes
69
		  OraDatabase.Parameters.Add "BOM_ID", 			Request("bom_id"),			ORAPARM_INPUT, ORATYPE_NUMBER 
80
            </a>
70
		  OraDatabase.Parameters.Add "COMPARE_BOM_ID", 	Request("compare_bom_id"),	ORAPARM_INPUT, ORATYPE_NUMBER 
81
         </SPAN>
71
		  OraDatabase.Parameters.Add "PROD_ID",  		Request("prod_id"),		ORAPARM_INPUT, ORATYPE_NUMBER 
82
      </td>
72
		  OraDatabase.Parameters.Add "PKG_ID",  		Request("pkg_id"),		ORAPARM_INPUT, ORATYPE_NUMBER 
83
   </tr>
73
		  
84
   <tr>
74
		  Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ( QueryName ), ORADYN_DEFAULT )
85
      <td nowrap valign="top" class="body_row" colspan="3">
75
		  bgColor = NULL
86
         <DIV id="PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>" name="PRODNOTES_<%=parThisBomId%>_<%=parThisProdId%>" style="display:none;"><%=enumLOADING%></DIV>
76
 
87
      </td>
77
		  If rsQry.RecordCount < 1 Then
88
   </tr>
78
		  %>
89
   <%
79
		  <tr>
90
   ' parThisBomId is the ID of the BOM under which exists the package version that was clicked that led to this file being processed.
80
            <td <%=bgColor%> nowrap valign="top" class="body_row" colspan="2">Product not found.
91
   ' It is not the production BOM, which is referred to by parProdBomId.
81
			</td>
92
   ' parThisProdId is the ID of the product in the BOM refered to by parThisBomId
82
          </tr>
93
   ' parThisPkgId is the ID of the package of which the product is just one instance (version) of.
83
		  <%
94
   OraDatabase.Parameters.Add "BOM_ID",   parThisBomId,  ORAPARM_INPUT, ORATYPE_NUMBER
84
		  End If
95
   OraDatabase.Parameters.Add "PROD_ID",  parThisProdId, ORAPARM_INPUT, ORATYPE_NUMBER
85
		  
96
   OraDatabase.Parameters.Add "PKG_ID",   parThisPkgId,  ORAPARM_INPUT, ORATYPE_NUMBER
86
		  
97
 
87
		  While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
98
   Dim rsQryThisBom
88
		  	
99
   Set rsQryThisBom = OraDatabase.DbCreateDynaset( GetQuery ( QueryName ), ORADYN_DEFAULT )
89
		  	If IsNull( bgColor ) Then
100
 
90
				bgColor = "bgcolor='#F5F5F5'"
101
   Dim bgColor
91
			Else
102
   bgColor = NULL
92
				bgColor = NULL
103
 
93
			End If
104
   If rsQryThisBom.RecordCount < 1 Then
94
			
105
      %>
95
 
106
      <tr>
96
If Request("bom_id") <> "" AND Request("prod_id") <> "" Then
107
         <td <%=bgColor%> nowrap valign="top" class="body_row" colspan="2">Product not found.</td>
97
 
108
      </tr>
98
	Set rsPkg = OraDatabase.DbCreateDynaset( "select * from package_versions pv, packages pkg where pv.pv_id = "&Request("new_prod_id")&" and pkg.pkg_id = pv.pkg_id", cint(0))
109
      <%
99
	
110
   End If
100
	pkgName = rsPkg("pkg_name")
111
 
101
	pkgVersion = rsPkg("pkg_version")
112
   While (NOT rsQryThisBom.BOF) AND (NOT rsQryThisBom.EOF)
102
	pkgId = rsPkg("pkg_id")
113
 
103
	
114
      If IsNull( bgColor ) Then
104
	rsPkg.Close()
115
         bgColor = "bgcolor='#F5F5F5'"
105
	Set rsPkg = nothing
116
      Else
106
	
117
         bgColor = NULL
107
	Set rsProj = OraDatabase.DbCreateDynaset( "select br.branch_name, prj.proj_name from boms bm, branches br, dm_projects prj where bm.bom_id = "&Request("bom_id")&" and br.BRANCH_ID = bm.RTAG_ID_FK and prj.PROJ_ID = br.PROJ_ID", cint(0))
118
      End If
108
	
119
 
109
	projName = rsProj("proj_name")	
120
      If parProdBomId <> "" AND parThisProdId <> "" Then
110
	branchName = rsProj("branch_name")
121
 
111
	
122
         ' Get information from package_versions table for this product
112
	rsProj.Close()
123
         Dim rsQryThisBomPkgVer, ThisBomPkgName, ThisBomPkgVersion, ThisBomPkgId
113
	Set rsProj = nothing
124
 
114
	
125
         Set rsQryThisBomPkgVer = OraDatabase.DbCreateDynaset( "select * from package_versions pv, packages pkg where pv.pv_id = "&parThisProdId&" and pkg.pkg_id = pv.pkg_id", cint(0))
115
	
126
 
116
	Set rsOS = OraDatabase.DbCreateDynaset( "select bt.bos_type from os_base_env obe, base_env be, bos_types bt where obe.OS_ID = "&rsQry("os_id")&" and be.BASE_ENV_ID = obe.BASE_ENV_ID and bt.BOS_ID = be.BOS_ID", cint(0))
127
         ThisBomPkgName    = rsQryThisBomPkgVer("pkg_name")
117
	
128
         ThisBomPkgVersion = rsQryThisBomPkgVer("pkg_version")
118
	OSName = rsOS("bos_type")
129
         ThisBomPkgId      = rsQryThisBomPkgVer("pkg_id")
119
	
130
 
120
	If OSName = "Windows" OR OSName = "MOS" Then
131
         rsQryThisBomPkgVer.Close()
121
		OSName = "win32"
132
         Set rsQryThisBomPkgVer = nothing
122
	Else
133
 
123
		OSName = "sparc"
134
         ' Get the project and branch name for the production BOM
124
	End If	
135
         Dim rsQryProdBom, ProdBomProjName, ProdBomBranchName
125
	
136
         Set rsQryProdBom = OraDatabase.DbCreateDynaset( "select br.branch_name, prj.proj_name from boms bm, branches br, dm_projects prj where bm.bom_id = "&parProdBomId&" and br.BRANCH_ID = bm.RTAG_ID_FK and prj.PROJ_ID = br.PROJ_ID", cint(0))
126
	rsOS.Close()
137
 
127
	Set rsOS = nothing	
138
         ProdBomProjName   = rsQryProdBom("proj_name")
128
	
139
         ProdBomBranchName = rsQryProdBom("branch_name")
129
End If
140
 
130
			
141
         rsQryProdBom.Close()
131
		  %>
142
         Set rsQryProdBom = nothing
132
		  <tr>
143
 
133
            <td <%=bgColor%> nowrap valign="top" class="body_row" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;
144
         ' Get the OS name
134
			<%'If IsProductInNewBom Then%>
145
         Dim rsOS, OSName
135
				<img hspace="4" src="icons/<%=rsQry("node_icon")%>" align="absmiddle" border="0"><a href="NodeDefault.asp?node_id=<%=rsQry("node_id")%>&bom_id=<%=parBomId%>" class="body_link"><%=rsQry("node_name")%></a>
146
         Set rsOS = OraDatabase.DbCreateDynaset( "select bt.bos_type from os_base_env obe, base_env be, bos_types bt where obe.OS_ID = "&rsQryThisBom("os_id")&" and be.BASE_ENV_ID = obe.BASE_ENV_ID and bt.BOS_ID = be.BOS_ID", cint(0))
136
				&nbsp;/&nbsp;<a href="OsDefault.asp?os_id=<%=rsQry("os_id")%>&bom_id=<%=parBomId%>" class="body_link"><%=rsQry("os_name") %></a>
147
 
137
				&nbsp;/&nbsp;<%=rsQry("pkg_name") &" "& rsQry("pkg_version")%>
148
         OSName = rsOS("bos_type")
138
			<%'Else%>
149
 
139
				 
150
         If OSName = "Windows" OR OSName = "MOS" Then
140
				&nbsp;&nbsp;<a href="LogDownload.asp?url=http://auperaunx26/releases/<%=projName%>/<%=branchName%>/<%=pkgName%>/<%=OSName%>/<%=pkgVersion%>/<%=pkgName%>-<%=pkgVersion%>-<%=OSName%>.zip&pkg_id=<%=pkgId%>&pkg_version=<%=pkgVersion%>"  target="_blank" class="body_link">Download Version: <%=Request("new_version") %></a>&nbsp;&nbsp;
151
            OSName = "win32"
141
			<%'End If%>
152
         Else
142
 
153
            OSName = "sparc"
143
</td>
154
         End If
144
          </tr>
155
 
145
	  	  <%
156
         rsOS.Close()
146
		  	rsQry.MoveNext
157
         Set rsOS = nothing
147
		  WEnd
158
 
148
		  
159
      End If
149
		  OraDatabase.Parameters.Remove "BOM_ID"
160
 
150
		  OraDatabase.Parameters.Remove "PROD_ID"
161
      ' Now display the information we have gathered
151
		  OraDatabase.Parameters.Remove "PKG_ID_ID"
162
      %>
152
		  
163
      <tr>
153
		  
164
         <td <%=bgColor%> nowrap valign="top" class="body_row" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;
154
		  rsQry.Close
165
            <%'If IsProductInNewBom Then%>
155
		  Set rsQry = Nothing
166
            <img hspace="4" src="icons/<%=rsQryThisBom("node_icon")%>" align="absmiddle" border="0"><a href="NodeDefault.asp?node_id=<%=rsQryThisBom("node_id")%>&bom_id=<%=parThisBomId%>" class="body_link"><%=rsQryThisBom("node_name")%></a>
156
		  %>
167
            &nbsp;/&nbsp;<a href="OsDefault.asp?os_id=<%=rsQryThisBom("os_id")%>&bom_id=<%=parThisBomId%>" class="body_link"><%=rsQryThisBom("os_name") %></a>
157
		  
168
            &nbsp;/&nbsp;<%=rsQryThisBom("pkg_name") &" "& rsQryThisBom("pkg_version")%>
158
		  
169
            <%'Else%>
159
		</table>	
170
            <%If InStr(APP_ROOT, "DEPLOYMAN_WWW") > 0 Then%>
160
		 
171
               &nbsp;&nbsp;<a href="LogDownload.asp?url=http://client.erggroup.com/manager_suite/production_manager/downloads/<%=pkgName%>-<%=pkgVersion%>-<%=OSName%>.zip&pkg_id=<%=pkgId%>&pkg_version=<%=pkgVersion%>"  target="_blank" class="body_link">Download Version: <%=Request("new_version") %></a>&nbsp;&nbsp;
161
	
172
            <%Else%>
162
	
173
               &nbsp;&nbsp;<a href="LogDownload.asp?url=http://auperaunx26/releases/<%=ProdBomProjName%>/<%=ProdBomBranchName%>/<%=ThisBomPkgName%>/<%=OSName%>/<%=ThisBomPkgVersion%>/<%=ThisBomPkgName%>-<%=ThisBomPkgVersion%>-<%=OSName%>.zip&pkg_id=<%=ThisBomPkgId%>&pkg_version=<%=ThisBomPkgVersion%>"  target="_blank" class="body_link">Download Version: <%=parThisVersion %></a>&nbsp;&nbsp;
-
 
174
            <%End If%>
-
 
175
            <%'End If%>
-
 
176
 
-
 
177
         </td>
-
 
178
      </tr>
-
 
179
      <%
-
 
180
      rsQryThisBom.MoveNext
-
 
181
   WEnd
-
 
182
 
-
 
183
   OraDatabase.Parameters.Remove "BOM_ID"
-
 
184
   OraDatabase.Parameters.Remove "PROD_ID"
-
 
185
   OraDatabase.Parameters.Remove "PKG_ID"
-
 
186
 
-
 
187
   rsQryThisBom.Close
-
 
188
   Set rsQryThisBom = Nothing
-
 
189
   %>
-
 
190
 
-
 
191
</table>
-
 
192
 
163
<%
193
<%
164
'------------ RUN AFTER PAGE RENDER -----------
194
'------------ RUN AFTER PAGE RENDER -----------
165
'----------------------------------------------
195
'----------------------------------------------
166
%><!--#include file="common/globals_destructor.asp"-->
-
 
167
196
%><!--#include file="common/globals_destructor.asp"-->
-
 
197