Rev 5958 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| wFTP |'| |'=====================================================%><%Option explicitResponse.Expires = 0%><!--#include file="common/globals.asp"--><!--#include file="common/config.asp"--><!--#include file="common/common_subs.asp"--><!--#include file="common/_popup_window_common.asp"--><!--#include file="class/classTabControl.asp"--><!--#include file="class/classTemplateManager.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_general.asp"--><%'------------ VARIABLE DEFINITION -------------Dim objTabControlDim objTemplateManagerDim rsQryDim OsTab'------------ CONSTANTS DECLARATION -----------'------------ VARIABLE INIT -------------------Call GetMainDBParameters ( dbPARproj_id, dbPARbranch_id, dbPARbom_id, dbPARnode_id, dbPARos_id, dbPARprod_id )parNode_id = dbPARnode_idparOs_id = dbPARos_id'------------ CONDITIONS ----------------------'----------------------------------------------%><%'--------------------------------------------------------------------------------------------------------------------------Function GenerateFTPscript ( nOsId )Dim rsQry, query, returnStringDim projName, branchName, osNameDim PkgName, PkgVersion, Ext, Description, PkgHealthTag, CmdInterface, Owner, IsInterface, PkgFlag, VersionFlagOraDatabase.Parameters.Add "OS_ID", nOsId, ORAPARM_INPUT, ORATYPE_NUMBERSet rsQry = OraDatabase.DbCreateDynaset( GetQuery("NodeSpecDetails.sql"), ORADYN_DEFAULT )'returnString = NULLprojName = rsQry("proj_name")branchName = rsQry("branch_name")osName = rsQry("os_name")If osName = "Solaris" ThenosName = "sparc"ElseosName = "win32"End IfOraDatabase.Parameters.Remove "OS_ID"rsQry.CloseSet rsQry = NothingOraDatabase.Parameters.Add "OS_ID", nOsId, ORAPARM_INPUT, ORATYPE_NUMBERSet rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductsList.sql"), ORADYN_DEFAULT )returnString = returnString + "#FTP Script for WIN32" + VBNewLinereturnString = returnString + "#ftp -s:<SCRIPT_FILE>" + VBNewLinereturnString = returnString + "open " + archive_server + VBNewLinereturnString = returnString + "<USERNAME>" + VBNewLinereturnString = returnString + "<PASSWORD>" + VBNewLinereturnString = returnString + "binary" + VBNewLinereturnString = returnString + "prompt" + VBNewLinereturnString = returnString + "cd /export" + VBNewLinereturnString = returnString + "cd deploy" + VBNewLinereturnString = returnString + "cd releases" + VBNewLinereturnString = returnString + "cd "&chr(34)&projName&chr(34) + VBNewLinereturnString = returnString + "cd "&chr(34)&branchName&chr(34) + VBNewLineWhile (NOT rsQry.BOF) AND (NOT rsQry.EOF)If osName = "win32" ThenreturnString = returnString + "mget "&chr(34)&rsQry("pkg_name")&"/"&osName&"/"&rsQry("pkg_version")&"/release/"&rsQry("pkg_name")&"-"&rsQry("pkg_version")&".exe"&chr(34)&""& VbNewLineElsereturnString = returnString + "mget "&chr(34)&rsQry("pkg_name")&"/"&osName&"/"&rsQry("pkg_version")&"/release/"&rsQry("pkg_name")&"-"&rsQry("pkg_version")&".pkg.gz"&chr(34)&""& VbNewLineEnd IfrsQry.MoveNext()WEndreturnString = returnString + "bye" + VBNewLinersQry.CloseSet rsQry = NothingSet rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductsList.sql"), ORADYN_DEFAULT )projName = Replace(projName, " ", "\ ")projName = Replace(projName, "(", "\(")projName = Replace(projName, ")", "\)")branchName = Replace(branchName, " ", "\ ")returnString = returnString + VBNewLine + VBNewLine + VBNewLinereturnString = returnString + "#FTP script for SPARC" + VBNewLinereturnString = returnString + "#ftp -n -v " + archive_server + " < <SCRIPT_FILE>" + VBNewLinereturnString = returnString + "user" + VBNewLinereturnString = returnString + "<USERNAME>" + VBNewLinereturnString = returnString + "binary" + VBNewLinereturnString = returnString + "prompt" + VBNewLinereturnString = returnString + "cd /export" + VBNewLinereturnString = returnString + "cd deploy" + VBNewLinereturnString = returnString + "cd releases" + VBNewLinereturnString = returnString + "cd "&projName + VBNewLinereturnString = returnString + "cd "&branchName + VBNewLineWhile (NOT rsQry.BOF) AND (NOT rsQry.EOF)returnString = returnString + "cd "&rsQry("pkg_name") + VBNewLinereturnString = returnString + "cd "&osName + VBNewLinereturnString = returnString + "cd "&rsQry("pkg_version") + VBNewLinereturnString = returnString + "cd release" + VBNewLineIf osName = "win32" ThenreturnString = returnString + "get "&rsQry("pkg_name")&"-"&rsQry("pkg_version")&".exe" + VBNewLineElsereturnString = returnString + "get "&rsQry("pkg_name")&"-"&rsQry("pkg_version")&".pkg.gz" + VBNewLineEnd IfreturnString = returnString + "cd .." + VBNewLinereturnString = returnString + "cd .." + VBNewLinereturnString = returnString + "cd .." + VBNewLinereturnString = returnString + "cd .." + VBNewLinersQry.MoveNext()WEndOraDatabase.Parameters.Remove "OS_ID"returnString = returnString + "bye" + VBNewLinersQry.CloseSet rsQry = Nothing' Return stringGenerateFTPscript = returnStringEnd Function'--------------------------------------------------------------------------------------------------------------------------%><%'------------ RUN BEFORE PAGE RENDER ----------'----------------------------------------------%><html><head><title>Deployment Manager</title><link rel="shortcut icon" href="<%=FavIcon%>"/><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?ver=<%=VixVerNum%>" rel="stylesheet" type="text/css"><script language="JavaScript" src="scripts/common.js?ver=<%=VixVerNum%>"></script></head><body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();"><table width="100%" border="0" cellspacing="0" cellpadding="10"><tr><td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle"> FTP Script Export </span> <br>Click on the text to select.</td></tr></table><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1" background="images/bg_blue.gif"><img src="images/spacer.gif" width="10" height="35"></td><td width="100%" background="images/bg_blue.gif" valign="bottom"><!-- TAB CONTROLS ++++++++++++++++++++++ --><%'[1] Tab Name'[2] Tab Link'[3] JavaScript Event e.g. "onClick='...'"'[4] Tab Image Selected'[5] Tab Image Diselected'[6] Tab Image Disabled'[7] Tab Hint'[8] Force Disable. Values: Y, N(default)OraDatabase.Parameters.Add "NODE_ID", parNode_id, ORAPARM_INPUT, ORATYPE_NUMBERSet rsQry = OraDatabase.DbCreateDynaset( GetQuery ("OsList.sql"), ORADYN_DEFAULT )OraDatabase.Parameters.Remove "NODE_ID"Set objTabControl = New TabControlobjTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleWinXP/tab_style.html") ) ' Supply tab style definitionobjTabControl.TabStyle = "StyleWinXP"If Request("ostab") <> "" ThenOsTab = CDbl( Request("ostab") )ElseOsTab = 0End IfWhile (NOT rsQry.BOF) AND (NOT rsQry.EOF)objTabControl.Add ( Array( rsQry("os_name"), SCRIPT_NAME &"?ostab="& rsQry("os_id") &"&"& objPMod.ComposeURL() , "", "", "", "", "", "" ) )If OsTab = 0 ThenOsTab = CDbl( rsQry("os_id"))objTabControl.SelectByName rsQry("os_name")ElseIf OsTab = CDbl(rsQry("os_id")) ThenOsTab = rsQry("os_id")objTabControl.SelectByName rsQry("os_name")End IfrsQry.MoveNext()WEndrsQry.Close()Set rsQry = nothingobjTabControl.Render ()%><!-- END OF TAB CONTROLS +++++++++++++++ --></td><td width="1" background="images/bg_blue.gif"></td></tr><tr><td> </td><td><br><textarea name="textfield" cols="70" rows="20" wrap="OFF" class="body_cmd" onFocus="this.select()"><%=GenerateFTPscript( OsTab )%></textarea></td><td> </td></tr></table></body></html><!--#include file="common/globals_destructor.asp"-->