Ver Mensaje Individual
  #8 (permalink)  
Antiguo 07/01/2005, 04:52
yomesmo
 
Fecha de Ingreso: noviembre-2003
Ubicación: Madrid
Mensajes: 353
Antigüedad: 21 años, 2 meses
Puntos: 1
Cuelgo el código:

<%
':: defino campos que compondrán el listado de opciones que el usuario puede marcar, todas las casillas tendrán el mismo nombre, pero se añadiran al campo de la BD solo los valores que haya marcado (Los valores son variables en ASP)

a_addeditfields = Array("Title","Author","user_name","ShortDesc","Vi ewDetail","LongDesc","DateAdded","DateLastMod","Da teAlert","Cat","Impressions","AvgRating","Priority ","Status","Image1","Thumbnail","RelatedURL","Down loadURL","Filename","NextContentId","ParentContent Id","Imprimir","EnvioEmail","Opinar","Subastas","T ienda")
a_displaylabels = Array(titulo,autor,nombre_usuario,desc_corta,ver_d etalle_link,desc_larga,fecha_Ad,ult_modificacion,f echa_Alerta,categoria,veces_visto,ver_votos,priori dad,estado,imagen,imagen_miniatura,url_relacionada ,"Download URL",fichero,previos&"/"&siguientes&" Link","Item "&enparentada,imprimir,Rec_EMail,"Opinar",Subastas ,E_Commerce)
%>




<%

'ahora muestro las casillas donde todas llevan el mismo nombre:"EditFields" pero hay dos valores donde se debe de escoger entre una de las opciones, o "Imágen redimensionada" o "Image1" y "thumbnail" pero no pueden ser que ambas estén marcadas"


if isNull(EditFields) then EditFields=""
a_fields = split(EditFields,",")
response.write ""
response.write "<br>"
response.write "<i><font color='#FF0000'><b>Nota:</b></font> Si se permite que los usuarios suban fotos al servidor. Debe escoger entre:<br>"
response.write "<font color='#FF0000'>Opci&oacute;n 1:</font> Suban Im&aacute;genes Redimensionadas automaticamente<br>"
response.write "<font color='#FF0000'>Opci&oacute;n 2:</font> Suban Im&aacute;genes o Thumbnails de tama&ntilde;o libre<br><br></i>"

response.Write("<table><tr><td>")

for j=0 to uBound(a_addeditfields)
checked = ""
for i = 0 to uBound(a_fields)
if trim(a_fields(i))=a_addeditfields(j) then
checked = "checked"
exit for
end if
next


'AQUI ES DONDE SE DAN LOS DOS VALORES QUE SON INCOMPATIBLES:

if (a_addeditfields(j) = "Image1" or a_addeditfields(j) ="Thumbnail")then
response.write "<input type=checkbox name=EditFields value='" & a_addeditfields(j) & "' " & checked & " AQUI DEBERÍA IR UN ONCLICK QUE DESACTIVARA LA CASILLA "IMAG_RESIZE" >* " & a_addeditlabels(j) & "&nbsp;"
elseif a_addeditfields(j) = "Imag_Resize" then response.write "<input type=checkbox name=EditFields value='" & a_addeditfields(j) & "' " & checked & "AQUI DEBERÍA IR UN ONCLICK QUE DESACTIVARA LAS CASILLAS "IMAGE1 Y THUMBNAIL"># " & a_addeditlabels(j) & "&nbsp;"

else
response.write "<input type=checkbox name=EditFields value='" & a_addeditfields(j) & "' " & checked & ">" & a_addeditlabels(j) & "&nbsp;"
end if
response.Write("<br>")
if (j+1) mod 5 = 0 then response.write "</td><td>"

next
response.Write("</td></tr></table>")


%>
__________________
Lo menos frecuente en este mundo es vivir. La mayoría de la gente existe, eso es todo...