Ver Mensaje Individual
  #5 (permalink)  
Antiguo 29/10/2012, 10:10
Avatar de bymorr
bymorr
 
Fecha de Ingreso: septiembre-2012
Mensajes: 118
Antigüedad: 11 años, 7 meses
Puntos: 9
Respuesta: Problemas al volver al php

ok.

Carga.php

Código Javascript:
Ver original
  1. <script>
  2.     $(function() {
  3.         $( "#dialog-confirm" ).dialog({
  4.             resizable: false,
  5.             height:100,
  6.             modal: true,
  7.             buttons: {
  8.                 "Delete all items": function() {
  9.                     var anio = $("#anio").val();
  10.                     var periodo = $("#periodo").val();
  11.                     var opcion = $("#opcion").val();
  12.                     var tabla = $("#resumen").val();
  13.                     $("#mensaje").load("mens.php?anio="+anio+"&periodo="+periodo+"&opcion="+opcion+"&tabla="+tabla);
  14.                     var variablejs =1;
  15.                     $( this ).dialog( "close" );
  16.                     return 1;
  17.                 },
  18.                 Cancel: function() {
  19.                     $( this ).dialog( "close" );
  20.                 }
  21.             }
  22.         });
  23.     });
  24.     </script>


Código PHP:
Ver original
  1. $sql3 = "SELECT COUNT(*) as total3 FROM ev_final WHERE anio = '$anio' and periodo='$periodo'";
  2.         $stmt = OCIParse($conn, $sql3);
  3.         oci_define_by_name($stmt,"TOTAL3",$dato3);
  4.         OCIExecute($stmt);
  5.         oci_fetch($stmt);
  6.         oci_free_statement($stmt);
  7.            
  8.         if (($dato1 >= 1)&&($dato2 >= 1)&&($dato3 >= 1)){
  9.            
  10.         ?>
  11.            
  12.             <div id="dialog-confirm" title="¿Desea actualizar la informacion?">
  13.             <p><span class="ui-icon ui-icon-alert" style="float: center; margin: 0 2px 20px 0;"></span>
  14.             La informacion que trata de ingresar ya se encuentra en nuestros registros. ¿Desea continuar?</p>
  15.             </div>
  16.  
  17. [B]//una vez que se envía no vuelve a esta parte para que se siga ejecutando el código.[/B]
  18.            
  19.         <?
  20.    
  21.         }
  22. else{
  23.     $c=("insert into resumen values($anio, $periodo,'$ambito')



mens.php

Código PHP:
Ver original
  1. $anio=$_GET['anio'];
  2. $periodo=$_GET['periodo'];
  3. $opcion=$_GET['opcion'];
  4.  
  5.  
  6.  
  7. if($opcion==1){
  8. $tabla="resumen";
  9.  
  10.  
  11.  
  12. $sql = "delete from $tabla where anio=$anio and periodo=$periodo";
  13.         $stmt = OCIParse($conn, $sql);
  14.         OCIExecute($stmt);
  15.         oci_free_statement($stmt);