Foros del Web » Programando para Internet » ASP Clásico »

insertar imagenes url

Estas en el tema de insertar imagenes url en el foro de ASP Clásico en Foros del Web. Hola monitos...espero que esten muy bien.. les cuento mi problem estoy trabajando con asp y javascript y mi bd oracle. lo que pasa es que ...
  #1 (permalink)  
Antiguo 14/06/2007, 20:37
 
Fecha de Ingreso: abril-2007
Mensajes: 8
Antigüedad: 17 años
Puntos: 0
insertar imagenes url

Hola monitos...espero que esten muy bien..
les cuento mi problem
estoy trabajando con asp y javascript y mi bd oracle.
lo que pasa es que un modulo de mi sistema consiste en un mantenedor , en el cual el administrador del sistema debe insertar nuevos datos.
los cuales son a modo de ejemplo:
tema: servicio de correo
subtema: No puedo ingresar al correo
solucion: para ingresar al correo usted debe seleccionar etc.
como ves se ingresa por ejemplo un tema , un subtema en relacion al tema y su solucion;lo que tengo que hacer ahora es insertar imagenes , de forma que si el usuario desee ir a la ayuda visual de soluciones de ese subtema pueda hacerlo. para ello tengo almacenada en la tabla imagenes , la url de estas, por lo tanto cree en www/root/nombre_de_mi_sistema/img una carpeta en la cual estan contenidas las imagenes.
mi problema esta en el hecho de que no se como insertar las url de las imagenes por cada solucion.
  #2 (permalink)  
Antiguo 14/06/2007, 21:00
 
Fecha de Ingreso: abril-2007
Mensajes: 8
Antigüedad: 17 años
Puntos: 0
Re: insertar imagenes url

<!--#include file="Conecction/Conn.asp" -->
<% ano = REQUEST.QUERYSTRING("ano")
mes = REQUEST.QUERYSTRING("mes")
solucion = REQUEST.QUERYSTRING("solucion")
mes_numerico = REQUEST.QUERYSTRING("mes_numerico")
ano_numerico = REQUEST.QUERYSTRING("ano_numerico")
par_operacion= REQUEST.QUERYSTRING("par_operacion")
fecha_creacion= REQUEST.QUERYSTRING("fecha_creacion")
descripcion = REQUEST.QUERYSTRING("descripcion")
id_tema = REQUEST.QUERYSTRING("id_tema")
id_subtema= REQUEST.QUERYSTRING("id_subtema")
SELECT_REG = "1"
INSERT_REG = "1"
DELETE_REG = "1"
UPDATE_REG = "1"
PAR_ERROR = "0"

IF PAR_OPERACION = "1" THEN
SQL = " SELECT id_tema FROM subtema " &_
" WHERE descripcion = '" & descripcion & "' "&_
" and solucion = '"& solucion &"' "&_
" and fecha_creacion = to_date('" & mes & "/" & ano & "','MM/YYYY') "

set REG = Conn.execute(SQL)

IF NOT REG.EOF THEN
PAR_ERROR = "1"
ELSE
c=22
c=c+1
Sql = " insert into subtema "&_
" (id_subtema, id_tema, id_imagen, descripcion, solucion, numero_consulta,fecha_creacion) " &_
" values " &_
" (inc_subtema.nextval,'" & id_tema & "', '', '" & descripcion & "' , '" & solucion & "', '"& numero_consulta &"', to_date('" & mes & "/" & ano & "','MM/YYYY') ) "
response.write solucion

set REG = Conn.execute(SQL)
'response.redirect("directorio1.asp")
END IF
END IF
SQL1 = " select to_char(fecha_creacion,'mm/yyyy') fecha_creacion "&_
" ,to_char(fecha_creacion,'mm') mes "&_
" ,to_char(fecha_creacion,'yyyy') ano "&_
" ,solucion "&_
" ,descripcion "&_
" ,id_tema "&_
" from subtema "
'PAR_ORDER
'response.write SQL
Set REG1 = Conn.execute(SQL1)

IF PAR_OPERACION = "2" THEN
SQL = " delete from subtema "& _
" where solucion = '" & solucion & "' "&_
" and descripcion = '" & descripcion & "' "&_
" and id_tema = '" & id_tema & "' "&_
" and fecha_creacion = to_date('" & mes_numerico & "/" & ano_numerico & "','MM/YYYY') "
par_operacion = 3
set REG1= Conn.execute(SQL)
END IF
IF PAR_OPERACION = "4" THEN
SQL = " update subtema "&_
" SET descripcion = '" & descripcion & "' "& _
" ,solucion = '" & solucion & "' "&_
" where descripcion = '" & descripcion & "' "&_
" and solucion = '" & solucion & "' "
response.write SQL
set REG1 = Conn.execute(SQL)
par_operacion = 3
END IF

IF PAR_OPERACION = "3" THEN
SQL1 = " select to_char(fecha_creacion,'mm/yyyy') fecha_creacion "&_
" ,to_char(fecha_creacion,'mm') mes "&_
" ,to_char(fecha_creacion,'yyyy') ano "&_
" ,solucion "&_
" ,descripcion "&_
" ,id_tema "&_
" from subtema "&_
PAR_ORDER
'response.write SQL
Set REG1 = Conn.execute(SQL1)
END IF%>
<HTML>
<HEAD>
<script language="javascript">
function Guardar()...
function Actualizar( id_tema, descripcion, solucion, mes, ano )...
function Eliminar( id_tema, solucion, descripcion, mes_numerico,.... ano_numerico )
function Limpiar()..........
</script>
</head>
<body>
<form name="form1" method="get">
<div align="center"><span class="Estilo2">
</span></div>
<p><span class="Estilo2">
</span></p>
<span class="Estilo6"></span>

<table width="573" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor = "#000000" >
<tr>
<td height="32" colspan="6" bgcolor="#999999"><div align="center">
<div align="center"><p > <strong>
<input type="hidden" name="par_order" maxlength="50" size="5">
<input name="par_operacion" type="hidden" id="par_operacion">
<input name="mes_numerico" type="hidden" id="mes_numerico">
<input name="ano_numerico" type="hidden" id="ano_numerico">
</strong><span class="Estilo17">MANTENEDOR DE TEMAS </span></p>
</div>
</div>
<div align="right"></div>
<div align="left"><span class="Estilo6"></span></div></td>
</tr>
<tr bordercolor = "#FFFFFF" bgcolor ="#FFFFFF">
<td width="117" align="left" class="Estilo16 Estilo22">Periodo</td>
<td colspan="2" align="left"><span class="Estilo23">
Mes
<select name="mes" class="texto" value = "<%=("mes_numerico")%>" style="HEIGHT : 22px; WIDTH: 100px;font-size: xx-small" >
<%
sql = " SELECT TO_CHAR(SYSDATE,'MM') mes from dual"
set REG = Conn.execute(SQL)
do while not REG.eof
%>
<option value="<%=REG("mes")%>" ><%=REG("mes")%></option>
<%
REG.movenext
loop
%>
</select>
<select name="ano" class="texto" value = "<%= ("ano_numerico")%>" style="HEIGHT : 22px; WIDTH: 100px;font-size: xx-small" >
<%
sql = " SELECT TO_CHAR(SYSDATE,'YYYY') ano from dual"
set REG = Conn.execute(SQL)
do while not REG.eof
%>
<option value="<%=REG("ano")%>" ><%=REG("ano")%></option>
<%
REG.movenext
loop
%>
</select>
</span></span></td>

<td width="124" align="left">
<span class="Estilo23"><a href="javascript:Guardar()">
<img src="imagenes/ico_guardar.gif" width="20" height="20" border=0 title= "Grabar Registro" ></a>
<a href="javascript:Limpiar()">
<img src="imagenes/ico_limpiar.gif" width="20" height="20" border="0" title ="Limpiar" ></a>
<a href="menu_admin1.asp" target="_self">
<img src="imagenes/inicio.gif" width="23" height="23"alt="Volver al men&uacute; Ppal." border="0" style="{ cursor: hand}"></a> </span></tr>

<tr bordercolor = "#FFFFFF" bgcolor = "#FFFFFF">
<td height="27" align="left" class="Estilo16 Estilo22">tema</td>
<td colspan="2" align="left"><select name="id_tema" class="texto" id="id_tema" style="HEIGHT : 22px; WIDTH: 180px; font-size: 10px; font-family: Arial;" >
<option value="0">seleccione</option>
<%
SQL = " SELECT id_tema, descripcion from tema "
set REG = Conn.execute(SQL)
do while not REG.eof
%>
<option value="<%=REG("id_tema")%>" ><%= REG("descripcion")%></option>
<% REG.movenext
loop %>
</select></td>
<td width="124" align="left"><span class="Estilo22"></span></td>
</tr>
<tr bordercolor ="#FFFFFF" bgcolor="#FFFFFF" >
<td align="left"><span class="Estilo23">Descripcion</span></td>
<td width="124" align="left"><input name="descripcion" type="text">
<td colspan="3" align="left"><span class="Estilo22"></span></td>
</tr>
<tr bordercolor ="#FFFFFF" bgcolor="#FFFFFF" >
<td height="44" align="left"><span class="Estilo23">Solucion</span></td>
<td align="left"><textarea name="solucion" type="text" ></textarea>
<input name="button" type="button" onClick="self.location.href=(//localhost/Base_conocimientos/directorio1.asp?id_subtema=<%=id_subtema%>')" value="Ingresar Imagenes" />
<!-- <img src="cPanel X_archivos/fileman.gif" width="32" height="32"alt="Insertar Imagenes" border="0" style="{ cursor: hand}"></a> -->
<td colspan="3" align="left"><span class="Estilo22"></span></td>
</tr>
</table>

<table width="200" border="0" align="center">
<tr>
<th height="21" scope="row">&nbsp;</th>
<td>&nbsp;</td>
</tr>
</table>
<table border="1" cellpadding="0" cellspacing="0" width="99%" bordercolor= "#000000" >
<tr bgcolor="#999999">
<td width="221" bgcolor="#999999" >
<div align="center" class="Estilo24 Estilo26">

<% do While not REG1.EOF %>
<tr>
<td width="221" height="23" valign=top bgcolor=#ffffff>
<div align="center" class="Estilo23"><span class="Estilo11"> <%=REG1("fecha_creacion")%> </span></div></td>

<td width="221" valign=top bgcolor=#ffffff>
<div align="center" class="Estilo28"> <%=REG1("descripcion")%> </span></div></td>
<td bgcolor=#ffffff valign=top width="223" >
<div align="center" class="Estilo28"> <%=REG1("solucion")%> </div></td>
<td bgcolor=#ffffff valign=top width="221" >
<!-- --><div align="center" class="Estilo28"> <%=REG1("id_tema")%></div></td>
<td bgcolor=#ffffff valign=top width="34">
<div align="center" class="Estilo11">
<a href="javascript:Eliminar(<%=REG1("id_tema")%>,'<% =REG1("solucion")%>','<%=REG1("descripcion")%>',<% =REG1("mes")%>,<%=REG1("ano")%> )">
<img src="imagenes/ico_eliminar.gif" border=0 align="middle" title = "Eliminar Registro" >
</a></div></td>
<td bgcolor=#ffffff valign=top width="30"><span class="Estilo11">
<a href="javascript:Actualizar(<%=REG1("id_tema")%>,' <%=REG1("descripcion")%>','<%=REG1("solucion")%>', <%=REG1("mes")%>,<%=REG1("ano")%> )">
<img src="imagenes/ico_editar.gif" width="21" height="21" border=0 title = "Editar Registro" ></a></span></td>

</tr>

<% REG1.movenext
loop
REG1.close
conn.close%>
</table>
</form>
<%IF PAR_ERROR = "1" THEN %>.........
</HTML>
este es en ojalá puedan ayudarme
envio mi messenger por si me quieren agregar
[email protected]
slds y graciass XD
  #3 (permalink)  
Antiguo 15/06/2007, 16:18
Avatar de Shiryu_Libra
Colaborador
 
Fecha de Ingreso: febrero-2007
Ubicación: Cantando "Screenager" en "Kirafa Kaput"
Mensajes: 3.614
Antigüedad: 17 años, 1 mes
Puntos: 88
Re: insertar imagenes url

monitta

si en tu base de datos tienes el campo id_imagen, por que no haces referencia a esa imagen??

si los problemas los tienes catalogados mediante algun numero, haz una conjugacion de numeros

p1,s1,m1 =
p1,s1,m2 =

entonces, el campo imagen lo que deberia de haber es
p1s1m1
y en tu carpeta con imagenes, el nombre de dicha imagen seria
p1s1m1.jpg

no seria mas factible de esa forma???

suerte monitta
__________________
"Eres parte del problema, parte de la solucion o parte del paisaje"
Un Saludo desde Desierto de Altar, Sonora, MX.
Shiryu_libra
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:15.