Subversion Repositories DevTools

Rev

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

Rev 1376 Rev 4809
Line 117... Line 117...
117
If (objUpload.Fields("pv_id").Value <> "") Then
117
If (objUpload.Fields("pv_id").Value <> "") Then
118
 
118
 
119
   ' Insert Unit Test Record
119
   ' Insert Unit Test Record
120
   Call Get_Pkg_Short_Info(  objUpload.Fields("pv_id").Value, NULL, sPkgName, sPkgVersion, NULL, NULL, NULL )
120
   Call Get_Pkg_Short_Info(  objUpload.Fields("pv_id").Value, NULL, sPkgName, sPkgVersion, NULL, NULL, NULL )
121
 
121
 
-
 
122
    ' Compile path to save file to
-
 
123
    If instr(Request.ServerVariables("HTTP_USER_AGENT"), "MSIE") > 0 Then
-
 
124
        sFileName = objUpload.Fields("results_file").FileName
-
 
125
    Else
-
 
126
        sFileName = objUpload.Fields("results_file").FilePath
-
 
127
    End If
-
 
128
 
122
   Call Update_Unit_Test ( objUpload.Fields("test_id").Value, _
129
   Call Update_Unit_Test ( objUpload.Fields("test_id").Value, _
123
                   objUpload.Fields("test_type_id").Value, _
130
                   objUpload.Fields("test_type_id").Value, _
124
                   objUpload.Fields("pv_id").Value, _
131
                   objUpload.Fields("pv_id").Value, _
125
                   objUpload.Fields("test_summary").Value, _
132
                   objUpload.Fields("test_summary").Value, _
126
                   objUpload.Fields("numof_test").Value, _
133
                   objUpload.Fields("numof_test").Value, _
127
                   objUpload.Fields("completion_date").Value, _
134
                   objUpload.Fields("completion_date").Value, _
128
                   objUpload.Fields("results_file").FileName, _
135
                   sFileName, _
129
                   objUpload.Fields("results_url").Value, _
136
                   objUpload.Fields("results_url").Value, _
130
                   objUpload.Fields("results_file").Length, _
137
                   objUpload.Fields("results_file").Length, _
131
                   sFileName)
138
                   sFileName)
132
 
139
 
133
   If objEH.LastOraFailed = FALSE Then
140
   If objEH.LastOraFailed = FALSE Then
134
      ' Upload File
141
      ' Upload File
-
 
142
 
135
      If CInt(objUpload.Fields("test_type_id").Value) <> enumTEST_TYPE_AUTOMATIC AND objUpload.Fields("results_file").FileName <> "" Then
143
      If CInt(objUpload.Fields("test_type_id").Value) <> enumTEST_TYPE_AUTOMATIC AND sFileName <> "" Then
136
 
144
 
137
         If objUpload.Fields("results_file").Length > 0 Then
145
         If objUpload.Fields("results_file").Length > 0 Then
138
            ' Compile path to save file to
146
            ' Compile path to save file to
139
            sPath = Server.MapPath( TEMP_FOLDER )
147
            sPath = Server.MapPath( TEMP_FOLDER )
140
            Call Create_Folder ( sPath, sPkgName )
148
            Call Create_Folder ( sPath, sPkgName )
Line 145... Line 153...
145
            sPath = sPath &"\"& sPkgVersion
153
            sPath = sPath &"\"& sPkgVersion
146
            Call Create_Folder ( sPath, DOC_FOLDER )
154
            Call Create_Folder ( sPath, DOC_FOLDER )
147
 
155
 
148
            sPath = sPath &"\"& DOC_FOLDER &"\"& sFileName
156
            sPath = sPath &"\"& DOC_FOLDER &"\"& sFileName
149
            Call DeleteFile( sPath )      ' Delete the file if already exists
157
            Call DeleteFile( sPath )      ' Delete the file if already exists
150
 
-
 
151
            ' Save the binary data to the file system
158
            ' Save the binary data to the file system
152
            objUpload("results_file").SaveAs sPath
159
            objUpload("results_file").SaveAs sPath
153
         End If
160
         End If
154
      End If
161
      End If
155
   End If
162
   End If