-
Notifications
You must be signed in to change notification settings - Fork 0
/
elimina_docforo.asp
82 lines (72 loc) · 1.72 KB
/
elimina_docforo.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<%@ Language=VBScript %>
<%
dim usuario
usuario = session("id")
if isempty(usuario) then
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<script language="javascript">
function cerrarventana() {
window.close()
}
</script>
<BODY onload="javascript:cerrarventana()">
</BODY>
</HTML>
<%
end if
dim db
dim resultado
dim objupload
dim documento
dim rs
documento = Request.Form("documento")
tipo = request.form("tipo")
set db = server.CreateObject("SQLComandos.Comandos")
sql = "select foro,archivo from documento where id = "& documento
set rs = db.SQLSelect("DBBAECYS",sql)
if not rs.EOF then
archivo = rs("archivo")
foro = rs("foro")
end if
set rs = nothing
RootFolderName = Server.MapPath(".") & "\"
Path = RootFolderName & "Foros" &"\" & archivo
set objupload = server.CreateObject ("dundas.upload.2")
objupload.FileDelete (Path)
set objupload = nothing
sql = "delete from documento where id = "& documento
resultado = db.SQLOtras("DBBAECYS",sql)
set db = nothing
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<script language="javascript">
function cerrarventana() {
if (forma.tipo.value=='2') {
//alert(forma.tipo.value+'si ingreso')
forma.action = 'desarrollo_foro.asp'
forma.submit()
}
else
{
opener.document.location = "reporte_foros.asp"
}
if (window && !window.closed)
{
window.close()
}
}
</script>
<BODY onload="javascript:cerrarventana()">
<form name="forma" action="" method="get" target="principal">
<input name="foro" type="hidden" value="<%=foro%>">
<input name="tipo" type="hidden" value="<%=tipo%>">
</form>
</BODY>
</HTML>