elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Introducción a la Factorización De Semiprimos (RSA)


  Mostrar Temas
Páginas: 1 2 [3] 4 5 6 7 8 9
21  Programación / PHP / Mapa en: 18 Julio 2017, 15:02 pm
Hola tengo un listado de objetos en una tabla con una foto, y una dirección postal asociada. ¿Cómo podría hacer un mapa para que en cada dirección me muestre la foto con google? Y mostrarlo en en mi página php?

Sabéis de algún  manual o sitio donde lo explique. Sé que he hecho mal porque voy a mirarlo está tarde pero por si acaso os lo pregunto por aquí.

Muchas Gracias por adelantado.

22  Programación / PHP / Formulario gastos en: 18 Junio 2017, 22:44 pm
Hola,

Abrí otro hilo preguntando sobre un código con javascript para tratar de crear un formulario de gastos. Pero no hay manera que funcione. La idea es tener un formulario donde el usuario conectado ponga el número de km que ha hecho, el sistema multiplica por 0.19 y calcula el total.

La segunda línea del formulario es si tiene gastos de parking
Y la tercera gastos de hotel.

La línea final del formulario es la suma de los tres importes.

La idea es que una vez rellenos viajen estos datos marcados al darle a un botón a gastos.php donde recibiré las variables enviadas mediante post.

¿alguien me podría orientar un poco?

Muchas Gracias por adelantado.

Sabéis de alguna web o manual donde oriente lo básico de javascript para poder hacerlo.

Muchas Gracias por adelantado de nuevo.
23  Programación / PHP / Envio de variable post en: 14 Junio 2017, 19:17 pm
Hola,

estoy intentando que en un formulario como el código que expongo me aparezca la variable "cantidadkm" que envio a través de POST a gastos.php pero sí que envia la variable
Código
  1. $.post( "gastos.php", { cantidadkm: "$_POST[cantidadkm]", id_usuario: "2pm" } );

id_usuario pero no la de cantidadkm.

He puesto el script de javascript en diferentes órdenes pero no lo consigo.

¿Podéis alguno que controle orientarme dónde está el fallo o cómo enviar las variables del formulario?

No sé qué pasa
Código
  1.  
  2. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  3.  
  4.  
  5. <?php
  6.  
  7.  
  8. //Inicializar una sesion de PHP
  9.  
  10. //Validar que el usuario este logueado y exista un UID
  11. if ( ! ($_SESSION['autenticado'] == 'SI' && isset($_SESSION['uid'])) )
  12. {
  13.    //En caso de que el usuario no este autenticado, crear un formulario y redireccionar a la
  14.    //pantalla de login, enviando un codigo de error        <form name="formulario" method="post" action="index.php">
  15. ?>
  16.        <form name="formulario" method="post" action="index.php">
  17.            <input type="hidden" name="msg_error" value="2">
  18.        </form>
  19.        <script type="text/javascript">
  20.            document.formulario.submit();
  21.        </script>
  22.  
  23. <?php
  24. }
  25.  
  26.    //Conectar BD
  27.    include("conectar_bd.php");  
  28.    conectar_bd();
  29.  
  30.    //Sacar datos del usuario que ha iniciado sesion"Propietario/a de ".$fila['Direccion']." ".$fila['PuertaLocalGaraje']
  31.    $sql = "SELECT   tx_nombre,tx_apellidoPaterno,tx_TipoUsuario,id_usuario, tx_password
  32.            FROM tbl_users
  33.            LEFT JOIN ctg_tiposusuario
  34.            ON tbl_users.id_TipoUsuario = ctg_tiposusuario.id_TipoUsuario
  35.            WHERE id_usuario = '".$_SESSION['uid']."'";        
  36.    $result     =mysql_query($sql);
  37.  
  38.    $nombreUsuario = "";
  39.  
  40. $cif = "";
  41.  
  42.  
  43.    //Formar el nombre completo del usuario
  44.    if( $fila = mysql_fetch_array($result) )
  45.        $nombreUsuario = "".$fila['tx_nombre'];
  46.        $cif = "".$fila['CIF'];
  47.  
  48.  
  49. //Cerrrar conexion a la BD  <form action="insertarvisitas.php" method="POST" name="form">echo '<td>'.'<a href="principal.php?id='.$muestra['ofi'].'">'.'<strong>Ir a Registrar</strong>'.'</a>'.'</td>';
  50. mysql_close($conexio);
  51.  
  52. ?>
  53.  
  54.  
  55. <html lang="es">
  56. <!doctype HTML>
  57. <head>
  58.  
  59.  
  60. <title>UGT Bankia
  61. </title>
  62. <meta charset="utf-8"/>
  63.  
  64. <meta name="viewport" content="width=devide-width,initial-scale=1"/>
  65. <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
  66. <link rel="stylesheet"  href="css/estilos.css" />
  67.  
  68.  
  69. <!--[if lt IE 9]>
  70. <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  71. <![endif]>-->
  72.  
  73. <link rel="stylesheet" href="flexslider.css"  media="screen" />
  74. <script src="jquery.min.js"></script>
  75. <script src="jquery.flexslider-min.js"></script>
  76. <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
  77.  
  78. <!-- Includes for this demo -->
  79. <link rel="stylesheet" href="css/flexslider.css" media="screen" />
  80.  
  81. <!-- Hook up the FlexSlider -->
  82. <script>
  83. $(window).load(function() {
  84. $('.flexslider').flexslider();
  85. });
  86. </script>
  87.  
  88.  
  89.  
  90.    <script type="text/javascript">
  91.    <!--
  92.        $().ready(function() {
  93.            $("#frmlogin").validate();
  94.            $("#usuario").focus();
  95.        });
  96.    // -->
  97.    </script>
  98.  
  99.  
  100.  
  101. </head>
  102. <body>
  103. <header>
  104.  
  105. <!<Cerrrar conexion a la BDlink rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
  106. <!<Cerrrar conexion a la BDlink rel="icon" href="/favicon.ico" type="image/x-icon">
  107.  
  108. <h1>
  109. <a href="index.php" >
  110. <img class="fade" alt="bla bla" src="img/bextlan-logo.jpg" />
  111. </a>
  112.  
  113. </h1>
  114.  
  115.  
  116.  
  117.  
  118. <nav>
  119.  
  120.  
  121.  
  122. <h2>  <td  width="15px" align="center">
  123.        <!-- Proporcionar Link para cerrar sesion -->
  124.        <a href="cerrarSesion.php">Cerrar Sesi&oacute;n &nbsp;</a>
  125.    </td>
  126.  
  127. </h2>
  128.  
  129.  
  130.  
  131.  
  132.  
  133. </nav>
  134.  
  135.  
  136.  
  137.  
  138.  
  139. </header>
  140.  
  141.  
  142.  
  143. <section id="contenido2">
  144. <br/>
  145.  
  146.  
  147. <section id="Mercados2">
  148.  
  149.  
  150. <article id="servicio12">
  151.  
  152. <br/>
  153. <h3><tr>                                              <!-- Dar Bienvenida al usuario -->
  154.    <td  width="100px" align="right">Bienvenid@ <b><?php echo $nombreUsuario ?>&nbsp;&nbsp;</b></td>
  155.  
  156. </tr></h3>
  157. <p>
  158. <br/>
  159.  
  160.  
  161. Por favor, registra tu visita indicando todos los campos.
  162.  
  163. <br/>
  164. <br/>
  165.  
  166. <?php
  167.  
  168. ;
  169. ?>
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.    </head>
  179.  
  180.    <body>
  181.  
  182.  
  183.        <main>
  184.  
  185.            <div id="invoice">
  186.  
  187.                  <div class="alojamiento-box"> <form name="formulario" method="post" action="formulario1806.php">
  188.                <h3>GASTOS REALIZADOS POR</h3>
  189.                <p>&nbsp;</p>
  190.  <h3>DESPLAZAMIENTO</h3>
  191.                <div class="alojamiento-box">
  192.                    <div>Km.:
  193.                        <input type="text" class="qty" name="cantidadkm" />
  194.                        Unit price:
  195.                        <input type="text" class="unit" value="0.19"  readonly/>Cantidad:
  196.                        <input type="text" class="amount-aloj" readonly />
  197.                  </div>
  198.                    <div>Km.:
  199.                        <input type="text" class="qty"  />
  200.                        Unit price:
  201.                        <input type="text" class="unit" value="0.19" readonly/>Cantidad:
  202.                        <input type="text" class="amount-aloj" readonly />
  203.                  </div>
  204.                  <div class="alojamiento-box">
  205.                    <div>Km.:
  206.                        <input type="text" class="qty"  />
  207.                        Unit price:
  208.                        <input type="text" class="unit" value="0.19" readonly/>Cantidad:
  209.                        <input type="text" class="amount-aloj" readonly />
  210.                  </div>
  211.                    <div>Transporte p&uacute;blico:
  212.                        <input type="text" class="qty" value="1" />Gasto realizado:
  213.                        <input type="text" class="unit" />Cantidad:
  214.                        <input type="text" class="amount-aloj" readonly />
  215.                    </div>
  216.                    <div>Transporte Metropolitano:
  217.                        <input type="text" class="qty" />Gasto Realizado:
  218.                        <input type="text" class="unit" />Cantidad:
  219.                        <input type="text" class="amount-aloj" readonly />
  220.                    </div>Subtotal:
  221.                    <input type="text" class="alojamiento" readonly />
  222.              </div>
  223.  
  224.   <h3>DIETAS</h3>
  225.                <p>&nbsp;</p>
  226.  
  227.                <div class="alojamiento-box">
  228.                    <div>Km.:
  229.                        <input type="text" class="qty"  />
  230.                        Unit price:
  231.                        <input type="text" class="unit" value="0.19" readonly/>Cantidad:
  232.                        <input type="text" class="amount-dietas" readonly />
  233.                  </div>
  234.                    <div>Transporte p&uacute;blico:
  235.                        <input type="text" class="qty" value="1" />Gasto realizado:
  236.                        <input type="text" class="unit" />Cantidad:
  237.                        <input type="text" class="amount-dietas" readonly />
  238.                    </div>
  239.                    <div>Transporte Metropolitano:
  240.                        <input type="text" class="qty" />Gasto Realizado:
  241.                        <input type="text" class="unit" />Cantidad:
  242.                        <input type="text" class="amount-dietas" readonly />
  243.                    </div>Subtotal:
  244.                    <input type="text" class="dietas" readonly />
  245.              </div>
  246.  
  247.              <br>
  248.              <br>
  249.  
  250. DIETAS
  251.  
  252.   <br>
  253.   <br>
  254.  
  255.                <div class="desplazamiento-box">
  256.                    <div>Quantity:
  257.                        <input type="text" class="qty" />Desayunos:
  258.                        <input type="text" class="unit /">Cantidad:
  259.                        <input type="text" class="amount-desp" readonly />
  260.                    </div>
  261.                    <div>Quantity:
  262.                        <input type="text" class="qty" />Gasto realizado:
  263.                        <input type="text" class="unit" />Cantidad:
  264.                        <input type="text" class="amount-desp" readonly />
  265.                    </div>
  266.                    <div>Cantidad:
  267.                        <input type="text" class="qty" />Gasto en Desayunos:
  268.                        <input type="text" class="unit /">Cantidad:
  269.                        <input type="text" class="amount-desp" readonly />
  270.                    </div>
  271.                    <div>Quantity:
  272.                        <input type="text" class="qty" />Gasto realizado:
  273.                        <input type="text" class="unit" />Cantidad:
  274.                        <input type="text" class="amount-desp" readonly />
  275.                         <div>Quantity:
  276.                        <input type="text" class="qty" />Gasto realizado:
  277.                        <input type="text" class="unit" />Cantidad:
  278.                        <input type="text" class="amount-desp" readonly />
  279.                    </div>Subtotal:
  280.                    <input type="text" class="desplazamiento" readonly />
  281.                </div><br />
  282.  
  283.  
  284.  
  285.   <br>
  286.   <br>
  287.  
  288.  
  289.  
  290.  
  291.  
  292.                Total: <input type="text" class="total" readonly />
  293.  
  294.  
  295.    <?php  
  296.                      $cantidadkm=$_POST['cantidadkm'];
  297.  ?>            
  298.  
  299.  
  300.  
  301.  
  302.          </div>
  303.  
  304.  
  305.  
  306.  
  307.          </form>
  308.  
  309.          <center>
  310. <form name="form1">
  311. <input type="button" name="boton"  value="pinchame" onMouseOver="cambia();" onMouseOut="descambia();" onClick="gracias();"></center>
  312.  
  313. <script type="text/javascript">
  314.  
  315.  
  316.        <script type="text/javascript" src="//code.jquery.com/jquery-2.2.4.min.js"></script>
  317.        <script type="text/javascript" src="js/scripts.js"></script>
  318.  
  319.        <script type="text/javascript">
  320.            $(function () {
  321.  
  322.                function fnAlltotal() {
  323.                        var alojamiento_total    = 0, dietas_total    = 0, otrosgastos_total    = 0,
  324.                            desplazamiento_total = 0;
  325.  
  326.                    $('.amount-aloj').each(function () {
  327.                        alojamiento_total += parseFloat($(this).val() || 0);
  328.                    });
  329.                    $('.amount-desp').each(function () {
  330.                        desplazamiento_total += parseFloat($(this).val() || 0);
  331.                    });
  332.                    $('.amount-dietas').each(function () {
  333.                        dietas_total += parseFloat($(this).val() || 0);
  334.                    });
  335.                    $('.alojamiento').val(alojamiento_total);
  336.                    $('.desplazamiento').val(desplazamiento_total);
  337.                     $('.dietas').val(dietas_total);
  338.                    $('.total').val((alojamiento_total + desplazamiento_total+ dietas_total).toFixed(2));
  339.  
  340.                }
  341.  
  342.                $('.unit').on('keyup', function () {
  343.                    var self = $(this),
  344.                        qtyVal = self.prev().val();
  345.  
  346.                    self.next().val(qtyVal * self.val());
  347.                    fnAlltotal();
  348.                });
  349.  
  350.                $('.qty').on('keyup', function () {
  351.                    var self = $(this),
  352.                        unitVal = self.next().val();
  353.  
  354.                    self.next().next().val(unitVal * self.val());
  355.                    fnAlltotal();
  356.                });
  357.  
  358.            });
  359.  
  360.  
  361.        </script>
  362. <script language="javascript" type="text/javascript">
  363.  function cambia(){
  364.  document.forms[1].elements[0].value='?me vas a pinchar?'
  365. }
  366.  
  367. function descambia(){
  368.  document.forms[1].elements[0].value='pinchame'
  369. }
  370.  
  371. function gracias(){
  372.  alert('!Gracias por pincharme!')
  373.  
  374. $.post( "gastos.php", { cantidadkm: "$_POST[cantidadkm]", id_usuario: "2pm" } );
  375. };
  376.  </script>
  377.  
  378. </form>
  379.  
  380.        </main>
  381.  
  382.        <footer>
  383.  
  384.        </footer>
  385.  
  386.    </body>
  387.  
  388. </html>
  389.  
  390.  

24  Programación / Bases de Datos / Mostrar la fecha más reciente en: 7 Marzo 2017, 10:41 am
Hola a todos,

A ver si me podéis ayudar en esta consulta, en un campo "buscar" yo obtengo los resultados con LIKE y los saco en una tabla:


Código
  1.  
  2. <?php
  3.  
  4. $busca="";
  5. $busca=$_GET['busca'];
  6. $conexion=mysql_connect("localhost","oscarugt","@duende109109109") or die("Problemas en la conexion");
  7. mysql_select_db("ugtdef",$conexion) or die("Problemas en la selección de la base de datos");  
  8.  
  9. if($busca!=""){
  10.  
  11. $busqueda=mysql_query("SELECT * FROM oficinas WHERE Oficina LIKE '%".$busca."%' OR direccion LIKE '%".$busca."%' OR Municipio LIKE '%".$busca."%' OR Provincia LIKE '%".$busca."%' OR ofi LIKE '%".$busca."%' OR delegadoDR LIKE '%".$busca."%'") ;
  12.  
  13.  
  14.  
  15.  
  16. ?>
  17.  
  18.  
  19.  
  20.  
  21. <table width="1054"  border="1" align="left">
  22.  <tr>
  23.  
  24.    <td>Oficina</td>
  25.    <td>Telefono</td>
  26.    <td>ofi</td>
  27.  
  28.      <td>Direcci&oacute;n</td>
  29.        <td>CP</td>
  30.          <td>Municipio</td>
  31.            <td>Provincia</td>
  32.              <td>CCAA</td>
  33.               <td>DDR</td>
  34.               <td>Enlace a Ofi</td>
  35.               <td>Registrar</td>
  36.  
  37.  </tr>
  38.  
  39.  
  40.  <?php
  41.  
  42.  
  43.  
  44.  
  45.  while($muestra=@mysql_fetch_array($busqueda)){
  46.  echo '<tr>';
  47.  echo '<td>'.$muestra['Oficina'].'</td>';
  48.  
  49.  echo '<td>'.'<a href="tel:+'.$muestra['telefono'].'">'.$muestra['telefono'].'</a>'.'</td>';    
  50. echo '<td>'.$muestra['ofi'].'</td>';
  51.  
  52.     echo '<td>'.$muestra['direccion'].'</td>';
  53.   echo '<td>'.$muestra['cp'].'</td>';
  54.     echo '<td>'.$muestra['Municipio'].'</td>';
  55.   echo '<td>'.$muestra['Provincia'].'</td>';
  56.     echo '<td>'.$muestra['CCAA'].'</td>';
  57.      echo '<td>'.$muestra['delegadoDR'].'</td>';
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. echo '<td><a href="oficinaaconsultartres.php?id='.$muestra['ofi'].'">','<strong>Ir a Oficina</strong>','</a></td>';
  65.  
  66. echo '<td><a href="principal.php?id='.$muestra['ofi'].'">','<strong>Ir a Registrar</strong>','</a></td>';
  67.  
  68.  }
  69.    }
  70.  
  71.  
  72. ?>
  73.  
  74. </table>
  75.  
  76.  


La cuestión es tengo una segunda tabla llamada "registrovisitas" en esta tabla está el campo común "ofi" y "fechavisita", lo que me gustaría es sacar en la tabla anterior, por cada línea de la tabla, que cogiera el campo "ofi" de esa línea que me saca en el echo y me saque el max(cast(STR_TO_DATE(fechavisita, '%d/%m/%Y') as date))

pero no lo consigo ni a la de tres.

¿esto es posible?

Muchas Gracias por adelantado.
25  Programación / Desarrollo Web / Ayuda para retomar programación en: 9 Octubre 2016, 18:07 pm

Hola a todos,

Hace un tiempo empecé a programar y tuve un accidente y he estado sin tocar nada de programar bastante tiempo, tanto que no me acuerdo de casi nada

La cuestión que en lo que tenía programado, tenía el siguiente index.php

Sé que está fatal, la cuestión es que he intentado tocar el css asociado y lo he destrozado.

Os lo adjunto debajo. ¿Como podría simplificar el index y que la parte de registro de usuario me quedara minimamente user friendly? He tocado el css y lo he dejado peor, voy a empezar de cero pero por si alguien en un vistazo es capaz de darme algunos consejos y pautas.

Muchas Gracias.
 
Código
  1.  
  2. <!DOCTYPE html>
  3. <html lang="es">
  4.  
  5. <br>
  6.  
  7.  
  8.  
  9.  
  10. <TABLE WIDTH="100%" HEIGHT="100%">
  11.  
  12.  
  13. <TR>
  14.  
  15.  
  16. <TD VALIGN="MIDDLE" ALIGN="CENTER">
  17.  
  18.  
  19.  
  20.  
  21.  
  22. <FONT SIZE=6>  Research <FONT>
  23. <br>
  24.  
  25. <FONT SIZE=2> Quantitative Solutions <FONT>
  26.  
  27.  
  28.  
  29. </TD>
  30.  
  31.  
  32. </TR>
  33.  
  34. </TABLE>
  35.  
  36. <head>
  37.  
  38.  
  39. <title> Company
  40. </title>
  41.  
  42. <meta charset="utf-8"/>
  43. <meta name="description" content="Análisis  "/>
  44. <meta name="viewport" content="width=devide-width,initial-scale=1"/>
  45. <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
  46. <link rel="stylesheet"  href="css/estilos.css" />
  47.  
  48.  
  49. <!--[if lt IE 9]>
  50. <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  51. <![endif]>-->
  52.  
  53. <link rel="stylesheet" href="flexslider.css"  media="screen" />
  54. <script src="jquery.min.js"></script>
  55. <script src="jquery.flexslider-min.js"></script>
  56. <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
  57.  
  58. <!-- Includes for this demo -->
  59. <link rel="stylesheet" href="css/flexslider.css" media="screen" />
  60.  
  61. <!-- Hook up the FlexSlider -->
  62. <script>
  63. $(window).load(function() {
  64. $('.flexslider').flexslider();
  65. });
  66. </script>
  67.  
  68.  
  69.  
  70.    <script type="text/javascript">
  71.    <!--
  72.        $().ready(function() {
  73.            $("#frmlogin").validate();
  74.            $("#usuario").focus();
  75.        });
  76.    // -->
  77.    </script>
  78. </head>
  79.  
  80. <body>
  81.  
  82.  
  83. <header>
  84.  
  85.  
  86.  
  87.  
  88. <h1>
  89.  
  90. <a href="index.php" >
  91. <span class="f"></span>   <img  alt="bla bla" src="img/fondo-interno.jpg" width="50" height="50" />
  92. </a>
  93.  
  94.  
  95. </h1>
  96.  
  97.  
  98.  
  99.  
  100. <nav>
  101.  
  102. <ul>
  103. <li><a>Bienvenido, accede a tu cuenta</a></li>
  104.  
  105.  
  106.  
  107. </ul>
  108. </nav>
  109.  
  110.  
  111.        <nav>
  112.  
  113.        Prueba
  114.        </nav>
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123. </header>
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. <section id="contenido">
  131. <section id="Mercados">
  132.  
  133.  
  134.  
  135.  
  136.    <article id="servicio3">
  137. <h3>Iniciar sesi&oacute;n  &nbsp;    </h3>
  138. <p>
  139.  
  140. <br /><br />
  141. <form id="frmlogin" name="frmlogin"  method="POST" action="validarUsuario.php">
  142. <table align="center" width="362" CELLPADDING="5">
  143.  
  144. <tr>
  145.    <td width="61">Usuario:</td>
  146.    <td width="142">
  147.        <input type="text" name="usuario" id="usuario" class="required" maxlength="50">
  148.    </td>
  149. </tr>
  150.  
  151. <tr>
  152.    <td>Password:</td>
  153.    <td>
  154.        <input type="password" name="password" id="password" class="required"  maxlength="50">
  155.    </td>
  156. </tr>
  157.  
  158.  
  159. <tr>
  160.    <td colspan="2" align="right">
  161.        <input type="submit" name="enviar" value="Enviar" >
  162.    </td>
  163.  
  164. </tr>
  165.  
  166.  
  167. </table>
  168. </form>
  169.  
  170.      </article>
  171.  </section>
  172. </section>
  173.  
  174.  
  175.  
  176.  
  177. <footer> Working progress</footer>
  178. </body>
  179. </html>
  180.  
  181.  
  182.  
  183.  


Código css

Código
  1.  
  2. /* Reglas para trabjar  */
  3.  
  4. * {
  5. border:0;
  6. margin: 0;
  7. padding: 0;
  8. }
  9.  
  10.  
  11. article,figcaption,figure,footer,header,hgroup,nav,section{
  12. display: block;
  13.  
  14. }
  15.  
  16. body  {
  17. background: #212121  url(../img/fondo.jpg);
  18. color:#FFF;
  19.  
  20.  
  21.  
  22. }
  23.  
  24.  
  25.  
  26. a{
  27.  
  28. color: #CEF6F5;
  29.  
  30. font-weight:bold;
  31. text-decoration:none;
  32.  
  33. }
  34.  
  35. a:hover{
  36.  
  37. color: #CEF6F5;
  38.  
  39. }
  40.  
  41.  
  42.  
  43. figcaption {
  44.  
  45. font-size: 0.85em;
  46. padding: 0.25em;
  47. text-align: center;
  48. min-height: 1500px;
  49. }
  50.  
  51. img, video{
  52. max-width: 100%;
  53.  
  54. }
  55.  
  56.  
  57.  
  58. header, section#contenido,section#contenido2, section#contenido111, footer {
  59.  
  60. background: #FFF url(../img/fondo-interno.jpg);
  61. margin: 0 auto;
  62. max-width: 100%;
  63. text-align: center;
  64.  
  65. }
  66.  
  67.  
  68. header h1, h2, h3, h4,h5,h6, nav {
  69.  
  70. display: inline-block;
  71. max-width: 100%;
  72. vertical-align: middle;
  73. }
  74.  
  75.  
  76.  
  77.  
  78.  
  79. h3,h4, h5{
  80. background: #E2E7F1;
  81. border-radius: 1em;
  82. margin-bottom: .5em;
  83. padding-left: .5em;
  84. box-shadow: .25em .25em .25em rgba(255, 153, 0,.5);
  85. color:#000000;
  86. }
  87.  
  88.  
  89.  
  90. h6{
  91. background: #E2E7F1;
  92. border-radius: 1em;
  93. margin-bottom: .5em;
  94. padding-left: .5em;
  95. box-shadow: .25em .25em .25em rgba(255, 153, 0,.5);
  96. color:#000000;
  97. }
  98.  
  99.  
  100. ol{
  101. padding: 0 2em;
  102. }
  103.  
  104. ol li{
  105. padding: 1em 0;
  106. }
  107.  
  108. nav ul{
  109.  
  110. list-style: none;
  111.  
  112. }
  113.  
  114.  
  115. nav li{
  116.  
  117. display: inline-block;
  118. padding=0.1em;
  119. vertical-align: top;
  120.  
  121.  
  122. }
  123.  
  124.  
  125.  
  126. nav a{
  127.  
  128. background: #FFF;
  129. border: 0.1em solid #57ABB8;
  130. border-radius: 0.25em;
  131. color: #F60;
  132. display: block;
  133.  
  134. font-size: 1.4em;
  135. padding: 0.2em;
  136. -ms-transition: all 0.5s ease-in;
  137. -moz-transition: all 0.5s ease-in;
  138. -o-transition: all 0.5s ease-in;
  139. -webkit-transition: all 0.5s ease-in;
  140. transition: all 0.5s ease-in;
  141.  
  142. }
  143.  
  144.  
  145. nav a:hover{
  146.  
  147. background: #212121;
  148. border: 0.1em dashed #F60;
  149. border-radius: 0 0.5em 0 0.5em;
  150. color: #FFF;
  151. -ms-transition: all 0.5s ease-out;
  152. -moz-transition: all 0.5s ease-out;
  153. -o-transition: all 0.5s ease-out;
  154. -webkit-transition: all 0.5s ease-out;
  155. transition: all 0.5s ease-out;
  156.  
  157.  
  158.  
  159. }
  160.  
  161.  
  162. section#principal, aside{
  163.  
  164. background: #1E6381;
  165.  
  166. border-radius: 0.5em;
  167.  
  168. display: inline-block;
  169.  
  170. margin: 0 auto;
  171. max-width: 100%;
  172. padding: 0.25em;
  173. vertical-align: top;
  174. width: 65%;
  175.  
  176. }
  177.  
  178.  
  179.  
  180. aside{
  181. width: 30%;
  182. }
  183.  
  184. aside img{
  185. border-radius: 0.5em;
  186. }
  187.  
  188.  
  189.  
  190.  
  191. section#Mercados{
  192.  
  193. margin: 0 auto;
  194. max-width:100%;
  195.  
  196. }
  197.  
  198.  
  199.  
  200.  
  201. article#servicio1, article#servicio3{
  202. background: #F6FCFC;
  203. margin-top: 4px; margin-right; 8px; margin-bottom: 8px; margin-left: 8px
  204. text-align: justify;
  205. border-radius: 0.5em;
  206. max-width:400 px;
  207. min-width: 400 px;
  208. min-height: 400 px;
  209. max-height: 400px;
  210.  
  211. padding: 0.995em;
  212. vertical-align: justify;
  213. color: #C00;
  214.  
  215.  
  216.  
  217. }
  218.  
  219. article#servicio99{
  220. background: #F6FCFC;
  221. margin-top: 4px; margin-right; 8px; margin-bottom: 8px; margin-left: 8px
  222. text-align: justify;
  223. border-radius: 0.5em;
  224.  
  225.  
  226. padding: 0.995em;
  227. vertical-align: center;
  228. width: 98%;
  229.  
  230. color: #C00;
  231.  
  232.  
  233.  
  234. }
  235.  
  236.  
  237. article#servicio1,article#servicio3{
  238. text-align: justify;
  239. background: #F6FCFC;
  240. border: 1px solid #d0d0d0;
  241. display:inline-block;
  242. border-radius: 0.5em;
  243. vertical-align: center;
  244. width: 31%;
  245. heigth: 21%;
  246. max-height: 10px;
  247. max-width: 200px;
  248. }
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256. footer{
  257.  
  258. color: #000;
  259. font-size: 0.85em;
  260. padding: 0.75em 0;
  261.  
  262. }
  263.  
  264.  
  265. .fade{
  266. opacity: 1;
  267. filter :alpha(opacity=10);
  268. -ms-transition: all 0.5s ease-in;
  269. -moz-transition: all 0.5s ease-in;
  270. -o-transition: all 0.5s ease-in;
  271. -webkit-transition: all 0.5s ease-in;
  272. transition: all 0.5s ease-in;
  273. }
  274.  
  275. .fade:hover{
  276. opacity: 0.7;
  277. filter :alpha(opacity=7);
  278. -ms-transition: all 0.5s ease-out;
  279. -moz-transition: all 0.5s ease-out;
  280. -o-transition: all 0.5s ease-out;
  281. -webkit-transition: all 0.5s ease-out;
  282.  
  283.  
  284. transition: all 0.5s ease-out;
  285.  
  286. }
  287.  
  288. @media(min-width:1081px){
  289. header h1{
  290. text-align: left;
  291. width:35%
  292. }
  293.  
  294. nav{
  295. text-align: center;
  296. width:100%
  297.  
  298. }
  299.  
  300. }
  301.  
  302. @media(max-width:1081px){
  303. nav li{
  304. font-size: 1.3em;
  305.  
  306. }
  307.  
  308. article#galeria-inicio{
  309.  
  310. width:80%
  311.  
  312. }
  313.  
  314. article#servicio1,article#servicio2,article#servicio3{
  315.  
  316. width:30%
  317. vertical-align: top
  318.  
  319.  
  320. }
  321.  
  322. aside{
  323. width: 20%;
  324.  
  325. }
  326.  
  327.  
  328. }
  329.  
  330. @media(max-width:800px){
  331. nav li{
  332. font-size: 0.95em;
  333.  
  334. }
  335.  
  336. article#galeria-inicio{
  337.  
  338. width:88%;
  339.  
  340. }
  341.  
  342. article#servicio1,article#servicio2,article#servicio3{
  343.  
  344. width:45%
  345.  
  346. }
  347.  
  348. }
  349.  
  350.  
  351.  
  352.  
  353. @media(max-width:600px){
  354.  
  355.  
  356. nav li{
  357. display: inline-block;
  358. margin: 0px;
  359. width:98%;
  360.  
  361.  
  362. }
  363.  
  364.  
  365. article#servicio1,article#servicio2,article#servicio3{
  366. width:50%
  367. }
  368.  
  369.  
  370. }
  371.  
  372. section#principal{
  373. margin-bottom: 0.2em;
  374. }
  375.  
  376. section#principal, aside{
  377. display: block;
  378.  
  379. width:95%
  380. }
  381.  
  382.  
  383. div.septrue {
  384. border-left:1px solid #363636;
  385. }
  386.  
  387. div.septrue {
  388. width:1px;
  389. height:17px;
  390. margin-top:7px;
  391. float:left;
  392. }
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
26  Programación / PHP / PHP ON CLICK en: 13 Junio 2016, 08:20 am
Hola tengo un formulario, que me han ayudado en este foro, con js la cuestión es que el formulario me completa una serie de campos y me gustaría que al darle a un botón me guardara todos los campos en una tabla de mysql.

En algo similar leí que eso se haría con un "on click?" donde puedo leer sobre cómo funciona esa función. ¿Alguien podría ponerme un ejemplo chorra de como guardar datos dandole a un botón a una base de datos? Muchas Gracias.
27  Programación / PHP / Formulario subtotales en: 6 Junio 2016, 08:25 am
Hola, quiero hacer un formulario de gastos, buceando por internet he visto algo que funciona:

Código
  1.  
  2. Quantity: Unit price: Amount:
  3.  
  4. Quantity: Unit price: Amount:
  5.  
  6. Quantity: Unit price: Amount:
  7.  
  8. Quantity: Unit price: Amount:
  9.  
  10. Quantity: Unit price: Amount:
  11.  
  12. Quantity: Unit price: Amount:
  13.  
  14. Total All:
  15.  
  16.  
  17.  

PREGUNTA 1

Se supone que para que multiplique y haga el total necesito este código de js, donde debo colocar esto para que calcule?:



Código
  1.  
  2.  
  3.  
  4. $(".qty").on('input', function () {
  5.    var self = $(this);
  6.    var unitVal = self.next().val();
  7.    self.next().next().val(unitVal * self.val());
  8.   fnAlltotal();
  9. });
  10.  
  11. $(".unit").on('input', function () {
  12.    var self = $(this);
  13.    var qtyVal = self.prev().val();
  14.    self.next().val(qtyVal * self.val());
  15.  fnAlltotal();
  16. });
  17.  
  18. function fnAlltotal(){
  19.  var total=0
  20.    $(".amount").each(function(){
  21.         total += parseFloat($(this).val()||0);
  22.    });
  23.    $(".result").val(total);
  24.  
  25. }
  26.  
  27.  
  28.  


PREGUNTA 2

Si utilizo dos subtotales en la página (utilizando el código anterior) pero dos veces (uno son gastos de alojamiento y otro bloque con su subtotal que sea gastos de desplazamiento) ¿Cómo conseguiría el total (suma de los dos subtotales?


PREGUNTA 3:

Si los campos de Quantity, total, etc quisiera que se guardaran en una tabla que quedara en la bdd mysql phpmyadmin (me explico fatal) ¿Cómo debería ponerlo en los campos? ¿Qué introducciones debería añadir?

Sé que son muchas cosas a ver si me podeis orientar
28  Programación / PHP / Check tick en: 27 Mayo 2016, 12:30 pm
Hola,

Llevo meses, sin programar y estoy viendo las cosas que tenía programadas. La cuestión por la que os escribo es la siguiente: Quisiera en PHP, poner un "ticker" o check box (que cuando haya un SI en la base de datos en el campo "quiere recibir mails" esté marcado con la "v" del visto bueno, el click, y sin marcar cuando ponga NO o vacío. ¿El tipo de datos en phpmyadmin ¿Cuál debería ser? Y en la programación de php, como lo debería poner (supongo que quizá es de HTML?).

Lo último, por si podeis orientarme. ¿Podíais orientarme, por si hay alguna manera, de forma que si le doy a un check box, le marque click automáticamente me ponga sí en la base de datos?

Muchas Gracias por adelantado.
29  Programación / PHP / Tabla con ficheros para descargar en: 10 Abril 2016, 20:03 pm
Hola quisiera hacer una tabla para mostrar en una página listado.PHP que acudiera a mi base de datos de MySQL donde habría por cada archivo idreg, fecha, nombre corto, nombre largo, descripción y el propio archivo.

Lo que quiero es que al acceder a listado.PHP me saqué todos los registros para poder descargar el que sea.

He visto que el link a los archivos que estén en una carpeta se hace con el href. Pero ¿los ficheros no están en la base de datos no? Están en una carpeta que si la habré subido al servidor pero no se no veo claro como podría hacerlo.

¿Alguien podría ayudarme un poco a un vídeo o manual o código ejemplo para iniciarlo?

Gracias por adelantado
30  Programación / Desarrollo Web / Tamaño igual para un div en un formulario en: 9 Enero 2016, 19:04 pm
Hola quisiera que en un form si pongo
Código
  1. <div>Móvil <input type="text"  name="movil" width="600px"  />

Código
  1. <div>Nombre y apellidos <input type="text"  name="movil" width="600px"  />

Que el "tamaño del texto (espacio que ocupa aunque quede blancos) "Móvil" llegue a la misma altura que el de nombre y apellidos. Para que parezca más simétrico he intentado poniendo

Código
  1. <div width="100px">
pero no lo reconoce y con espacios tampoco me queda fino, cómo podría hacerlo?
Páginas: 1 2 [3] 4 5 6 7 8 9
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines