<%@ $Language=JScript /* PARA COLORES PHP */ %><% include("../includes/DB_Conectar.php"); /*toma la seguridad de la página admEncEncuestas*/ $admABMLink_manual="admEncEncuestas.php"; //include("../includes/inc_auth.php"); include("../includes/funciones.php"); include("../includes/inc_encuestas_adm.php"); //aca proceso las posibilidades if($_GET["ds"]==1) { $msje=$I_datasaved; } if($id==-1 && $accion=="Guardar") { encNuevaPregunta($_POST["encuesta"],addslashes($_POST["spTitulo"]),$_POST["multiplesrespuestas"],$_POST["prioridades"]); // Hacemos un query para obtener el id y mostrar los datos como para agregar respuestas. $sql = "select preID from encPreguntas where prePregunta = '".$_POST["spTitulo"]."'"; $rs = $conn->execute($sql); header("Location: admEncPreguntasEdit.php?e=".$_GET["e"]."&p=".$rs->field("preID")."&ds=1"); exit(); } if($id!=-1 && $accion=="Actualizar") { //actualizo encModificarPregunta($id,$_POST["encuesta"],addslashes($_POST["spTitulo"]),$_POST["multiplesrespuestas"],$_POST["prioridades"]); header("Location: admEncPreguntasEdit.php?e=".$_GET["e"]."&p=".$id."&ds=1"); exit(); } if($id!=-1 && $accion=="Borrar") { //borro encBorrarPregunta($id); header("Location: admEncEncuestasEdit.php?e=".$_GET["e"]); exit(); } %> <%=$I_administration%> <%include("menu.php");%>
<%if($msje!=""){%> <%}%>
<% $e = encObtenerEncuesta($_GET["e"]); $p = encObtenerPregunta($_GET["p"]); %>

<%=$I_question." ".$p["Pregunta"]."";//$I_singlepageedition%>

<%=$msje%>
  <% $id = $_GET["p"]; if($id) { //aca buscas $p = encObtenerPregunta($id); } %>
" onsubmit="return copia();" > ">
 
<%=$I_question;%>
 
<%=$I_multipleanswers;%>
 
<%=$I_priorities;%>

<% if($_GET["p"]!=-1) { %>
<%=$I_addeditanswer;%>
<% $color="#eeefff"; $image="icon_editar.gif"; $image2="icon_preview2.gif"; $r = encObtenerRespuestas($id); for($i=0;$i<$r["Cant"];$i++) { $spID = $r["Respuestas"][$i]["ID"]; %> > <% if($color=="#eeefff"){$color="#dcdcee";$image="icon_editar2.gif";$image2="icon_preview1.gif";} else if($color=="#dcdcee"){$color="#eeefff";$image="icon_editar.gif";$image2="icon_preview2.gif";} } %>
 
<%=$I_answer;%> <%=$I_type%>
<%=$I_edit%>
<%=$r["Respuestas"][$i]["Respuesta"];%> <%=($r["Respuestas"][$i]["Tipo"]==1?"$I_normal":"$I_openf");%>
 
<% } %>

<%if($id!=-1){ %> <%}else{ %> <%}%>
<%if($id!=-1){ %> <%}%>


<% /* */ %>