<%
function Delectimagefile (newsid,i)
Set Delectfile=server. CreateObject ("Scripting.FileSystemObject")
Currentpath=server. MapPath ("images/news/")
Filename=currentpath & "& NewsID &"-"& I &". gif "
If Delectfile.fileexists (FileName) Then
Delectimagefile= "images/news/" & NewsID & "-" & I & ". gif"
Exit function
Else
Filename=currentpath & "& NewsID &"-"& I &". jpg "
If Delectfile.fileexists (FileName) Then
Delectimagefile= "images/news/" & NewsID & "-" & I & ". jpg"
Exit function
Else
Delectimagefile= "images/news/" & NewsID & "-" & I & ". bmp"
Exit function
End If
End If
End Function
function Delectimagefile_upload (newsid,i)
Set Delectfile=server. CreateObject ("Scripting.FileSystemObject")
Currentpath=server. MapPath (".. /images/news/")
Filename=currentpath & "& NewsID &"-"& I &". gif "
If Delectfile.fileexists (FileName) Then
delectimagefile_upload= NewsID & "-" & I & ". gif"
Exit function
Else
Filename=currentpath & "& NewsID &"-"& I &". jpg "
If Delectfile.fileexists (FileName) Then
delectimagefile_upload= NewsID & "-" & I & ". jpg"
Exit function
Else
Filename=currentpath & "& NewsID &"-"& I &". bmp "
If Delectfile.fileexists (FileName) Then
delectimagefile_upload= NewsID & "-" & I & ". bmp"
Exit function
Else
Delectimagefile_upload= ""
Exit function
End If
End If
End If
End Function