Rev 64 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| Bom_AllProducts |'| |'=====================================================%><%Option explicitResponse.Expires = 0%><%'To enable the script timeout to 5 minsServer.ScriptTimeout=600%><!--#include file="common/globals.asp"--><!--#include file="common/config.asp"--><!--#include file="common/common_subs.asp"--><!--#include file="common/_bom_common.asp"--><!--#include file="controls/ERGFormComponent/classFormComponent.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_general.asp"--><%'------------ VARIABLE DEFINITION -------------Dim rsQry, rsTempDim aProductListDim parProd_id_selectDim parShowallDim numOfRowsDim rowNumDim objFormCollectorDim objFormComponentDim sMessageDim ProdIdDim ChangeTypeDim rec'------------ CONSTANTS DECLARATION -----------Const LIMG_NOTE_NEW = "<img src='icons/i_note_new.gif' width='18' height='18' border='0' align='absmiddle'>"Const LIMG_NOTE_EDIT = "<img src='icons/i_note_edit.gif' width='18' height='18' border='0' align='absmiddle'>"'------------ VARIABLE INIT -------------------parProd_id_select = Request("prod_id_select")parShowall = Request("showall")Set objFormCollector = CreateObject("Scripting.Dictionary")Set objFormComponent = New FormComponent'------------ CONDITIONS ----------------------'----------------------------------------------%><%'--------------------------------------------------------------------------------------------------------------Sub GetAllProductsList ( nBom_id, outProductList )Dim rsQry, query, showAll'' Use SHOWALL parameter is BOM has old bom'showAll = "Y"'If nBom_id <> nComparedBomId Then' showAll = parShowall'End IfOraDatabase.Parameters.Add "BOM_ID", nBom_id, ORAPARM_INPUT, ORATYPE_NUMBERSet rsQry = OraDatabase.DbCreateDynaset( GetQuery ("AllProducts.sql"), ORADYN_DEFAULT )If rsQry.RecordCount > 0 ThenoutProductList = rsQry.GetRows()ElseoutProductList = NULLEnd IfOraDatabase.Parameters.Remove "BOM_ID"End Sub'--------------------------------------------------------------------------------------------------------------%><%'------------ RUN BEFORE PAGE RENDER ----------'----------------------------------------------%><html><head><title>Production Manager</title><meta HTTP-EQUIV="Pragma" CONTENT="no-cache"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css"><script language="JavaScript" src="scripts/common.js"></script><script language="JavaScript" src="scripts/remote_scripting.js"></script><script language="JavaScript" type="text/javascript"><!--function RequestProductLocation( paramString, rowId, changeType ){var requestURL// Product is changes, hence can be found in current bomrequestURL = 'RequestProductLocation.asp';// Show divToggleDisplay( 'PRODUCT_'+ rowId, 'IMG_EXPAND_PRODUCT_' + rowId, 'IMG_COLLAPSE_PRODUCT_' + rowId );// Set ajax divnameajaxdivname = 'PRODUCT_'+ rowId;if ( MM_findObj( ajaxdivname ).innerHTML == '<%=enumLOADING%>'){//Append the name to search for to the requestURLvar url = requestURL + paramString;//Create the xmlHttp object to use in the request//stateChangeHandler will fire when the state has changed, i.e. data is received back// This is non-blocking (asynchronous)xmlHttp = GetXmlHttpObject(stateChangeHandler);//Send the xmlHttp get to the specified urlxmlHttp_Get(xmlHttp, url);}}//--></script></head><body leftmargin="0" topmargin="0"><!-- HEADER ++++++++++++++++ --><!--#include file="_header.asp"--><!-- +++++++++++++++++++++++ --><!-- MAIN MENU + CRUMBS ++++++++++++++++ --><!--#include file="_main_menu.asp"--><!-- +++++++++++++++++++++++++++++++++++++ --><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1%" valign="top" background="images/bg_bage_0.gif"><!-- NODE BROWSER ++++++++++++++++++++++ --><!--#include file="_bom_browser.asp"--><!-- END OF NODE BROWSER +++++++++++++++ --></td><td width="1" background="images/bg_bage_1.gif"><img src="images/spacer.gif" width="1" height="600"></td><td width="100%" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top" background="images/bg_green.gif"></td><td align="right" valign="bottom" background="images/bg_green.gif" class="body_txtw"><%Call RenderTitleWithoutVersion( objBomCollector )%></td><td background="images/bg_green.gif"><img src="images/spacer.gif" width="10" height="20"></td></tr><tr><td width="1%" valign="top" background="images/bg_green.gif"></td><td width="100%" valign="bottom" background="images/bg_green.gif"><!-- TAB CONTROLS ++++++++++++++++++++++ --><!--#include file="_tabs_definition.asp"--><%Set objTabControl = New TabControlobjTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleWinXP/tab_style.html") ) ' Supply tab style definitionobjTabControl.TabStyle = "StyleWinXP"objTabControl.AddTabDefnition ( arrBomTabDef )objTabControl.SelectByName("All Products")objTabControl.Render ()%><!-- END OF TAB CONTROLS +++++++++++++++ --></td><td width="1%" background="images/bg_green.gif"><img src="images/spacer.gif" width="10" height="35"></td></tr><tr><td background="images/bg_bage_0.gif"><img src="images/spacer.gif" width="30" height="10"></td><td background="images/bg_bage_0.gif"><!-- BUTTONS CONTROL +++++++++++++++++++ --><!-- +++++++++++++++++++++++++++++++++++ --></td><td background="images/bg_green.gif"><img src="images/p_bar_corrner.gif" width="17" height="42"></td></tr><tr><td> </td><td> </td><td valign="top"><%If Request.Cookies( enumCOOKIE_NAME )( "user_bar" ) = "hide" Then%><a href="<%=SCRIPT_NAME%>?user_bar=<%=enumDEFAULT%>&<%=objPMod.ComposeURL()%>"><img src="icons/b_left.gif" title="Maximize favourits" width="13" height="13" vspace="5" border="0"></a><%End If%></td></tr></table><table width="100%" border="0" cellspacing="10" cellpadding="0"><tr><td width="1"><img src="images/spacer.gif" width="1" height="1"></td><td width="100%"><img src="images/spacer.gif" width="1" height="1"></td></tr><!-- ALL PRODUCTS BOM +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><tr><td align="right" valign="top"><img src="icons/i_bom_products.gif" hspace="3"></td><td valign="top" class="body_txt"><SPAN class="body_colb"><%Call RenderTitle( objBomCollector )%><br>All Products</SPAN><br><hr width="100%" size="1px" noshade color="#808080"><br><table width="100%" border="0" cellspacing="2" cellpadding="0"><tr><td width="1" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="11" height="11"></td><td width="20%" background="images/bg_table_border.gif"><table width="100%" border="0" cellspacing="1" cellpadding="2"><tr><td nowrap background="images/bg_table_col.gif" class="body_col">Product</td></tr></table></td><td width="20%" nowrap background="images/bg_table_col.gif" class="body_col">Version</td><td width="60%" nowrap background="images/bg_table_col.gif" class="body_col">Latest Version</td></tr><%Call GetAllProductsList ( dbPARbom_id, aProductList )If NOT IsNull( aProductList ) ThennumOfRows = UBound( aProductList, 2 )For rowNum = 0 To numOfRowsProdId = aProductList( 0, rowNum )ChangeType = NULLSet rsTemp = OraDatabase.DbCreateDynaset("SELECT * FROM PACKAGE_VERSIONS PV, PRODUCT_DETAILS PD WHERE PD.PROD_ID(+) = PV.PV_ID AND PV.PV_ID ="&ProdId, ORADYN_DEFAULT )%><tr><td valign="top"></td><td nowrap valign="top"><SPAN id="IMG_EXPAND_PRODUCT_<%=ProdId & ChangeType%>" name="IMG_EXPAND_PRODUCT_<%=ProdId & ChangeType%>" style="display:block;"><a href="javascript:;" class="menu_link" onClick="RequestProductLocation('?prod_id=<%=ProdId%>&bom_id=<%=dbPARbom_id%>&change_type=<%=ChangeType%>', '<%=ProdId & ChangeType%>');"><%=LIMG_EXPAND & GetProductIcon( rsTemp ) & aProductList( 1, rowNum )%></a></SPAN><SPAN id="IMG_COLLAPSE_PRODUCT_<%=ProdId & ChangeType%>" name="IMG_COLLAPSE_PRODUCT_<%=ProdId & ChangeType%>" style="display:none;"><a href="javascript:;" class="menu_link" onClick="ToggleDisplay( 'PRODUCT_<%=ProdId & ChangeType%>', 'IMG_EXPAND_PRODUCT_<%=ProdId & ChangeType%>', 'IMG_COLLAPSE_PRODUCT_<%=ProdId & ChangeType%>');"><%=LIMG_COLLAPSE & GetProductIcon( rsTemp ) & aProductList( 1, rowNum )%></a></SPAN><%rsTemp.Close()Set rsTemp = nothing%></td><td nowrap class="body_row" valign="top"><%=aProductList( 2, rowNum )%></td><%Set rsTemp = OraDatabase.DbCreateDynaset("SELECT * FROM BOMS WHERE BOM_ID="&Request("bom_id"), ORADYN_DEFAULT )OraDatabase.Parameters.Add "PKG_ID", aProductList( 4, rowNum ), ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "PROJ_ID", 122, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "BRANCH_ID", rsTemp("rtag_id_fk"), ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "FILTER_ON", 0, ORAPARM_INPUT, ORATYPE_NUMBERrsTemp.Close()Set rsTemp = nothingIf IsNull(aProductList( 5, rowNum )) ThenSet rsTemp = OraDatabase.DbCreateDynaset(GetQuery("LatestProdVersion.sql"), ORADYN_DEFAULT )For rec = 1 to 1If rsTemp("pkg_version") <> (aProductList( 2, rowNum )) Then%><td class="body_rowlite"><span class="body_txtr"><b><%=rsTemp("pkg_version")%></b></span></td><%Else%><td class="body_rowlite"></td><%End IfNextrsTemp.Close()Set rsTemp = nothingElse%><td class="body_rowlite"></td><%End IfOraDatabase.Parameters.Remove "PKG_ID"OraDatabase.Parameters.Remove "PROJ_ID"OraDatabase.Parameters.Remove "BRANCH_ID"OraDatabase.Parameters.Remove "FILTER_ON"%></tr><tr><td><img src="images/spacer.gif" width="1" height="1"></td><td nowrap valign="top" class="body_row" colspan="3"><DIV id="PRODUCT_<%=ProdId & ChangeType%>" name="PRODUCT_<%=ProdId & ChangeType%>" style="display:none;"><%=enumLOADING%></DIV></td></tr><%If rowNum <> numOfRows Then%><tr><td colspan="4" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr><%End If%><%NextElse%><tr><td colspan="4" class="body_txt">No Changes Found.</td></tr><%End If%><tr><td colspan="4" background="images/bg_table_border.gif"><table width="100%" border="0" cellspacing="1" cellpadding="2"><tr><td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr></table></td></tr></table></td></tr></table></td><td width="1%" valign="top" background="images/bg_favourits.gif"><%If Request.Cookies( enumCOOKIE_NAME )( "user_bar" ) <> "hide" Then%><%End If%></td></tr><tr><td background="images/bg_bage_0a.gif"><img src="images/spacer.gif" width="1" height="15"></td><td background="images/bg_bage_1.gif"><img src="images/spacer.gif" width="1" height="1"></td><td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td><td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td></tr><tr><td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="20"></td><td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td><td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td><td bgcolor="#FFFFFF"> </td></tr></table><!-- FOOTER ++++++++++++++++ --><!--#include file="_footer.asp"--><!-- +++++++++++++++++++++++ --></body></html><%'------------ RUN AFTER PAGE RENDER -----------Set objPMod = NothingSet objCrumbs = NothingSet objTabControl = Nothing'----------------------------------------------%><!--#include file="common/globals_destructor.asp"-->