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

 

 


Tema destacado: Guía rápida para descarga de herramientas gratuitas de seguridad y desinfección


  Mostrar Mensajes
Páginas: 1 ... 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 [25] 26 27 28 29
241  Programación / PHP / mail() no me funciona, que estoy haciendo mal? en: 26 Julio 2017, 20:08 pm
Hola tengo un formulario que al dar clic en Enviar tendría que enviar un correo a  i****************@hotmail.com y no me envía ningún mensaje pero en cambio si me dice que se a enviado (un mensaje que yo puse).

Código:
<?php
 $para = "i****************@hotmail.com";
 $mensaje = $_POST['message'];
 $asunto = $_POST['Subject'];
 if(mail($para, $asunto, $mensaje)) {
  echo "Correo enviado con éxito";
 }else{
  echo "Lo sentimos, pero hubo un error al enviar el correo";
 }
?>
242  Programación / Desarrollo Web / Re: Pongo dos estilos css con <link> y se me mezclan los estilos.solucion? en: 25 Julio 2017, 11:25 am
Si te refieres a que se aplican a elemntos que no son, entonces los CSS están mal formados. Los selectores deben ser lo más estrictos posible. Si tuvieras por ejemplo una tabla con clase "calendario" que tenga celdas con clase "dia", no basta con poner ".dia { ... }". Tienes que poner, por ejemplo, ".calendario .dia { ... }".

Si tu problema es otro, no lo entendí. ¿Qué es lo que se mezcla exactamente?

Gracias por la respuesta, ese fue el problema, llamaba a
Código:
li a {...}
en el menu despleglable pero en el calendario también hay <li> y <a> y los llamaba a todos los <li> y <a> que había en la página por eso se me mezclaban.
243  Programación / Desarrollo Web / Pongo dos estilos css con <link> y se me mezclan los estilos.solucion? en: 24 Julio 2017, 00:03 am
Hola tengo este código :
Código:
<!DOCTYPE html>
<?php include_once('functions.php'); ?>
<script>
  function mensaje1(){
    alert("Solo para ADMINISTRADORES.\nPara añadir un enlace a la tabla, tiene que ir a su curso y grupo.");
  }
</script>
<style>
  .legenda_calendario {
    background: none;
  }

  .titulo {
    border-radius: 5px;
    color: white;
    text-shadow: 3px 3px 3px #8A4B08;
    background: linear-gradient(#FE9A2E,#FF8000,#DF7401);
    font-family: segoe script;
  }
  .subtitulo {
    border-radius: 5px;
    color: white;
    text-shadow: 3px 3px 3px #8A4B08;
    background: linear-gradient(#FE9A2E,#FF8000,#DF7401);
    font-family: segoe script;
  }
  .td {
    border-radius: 5px;
    background: linear-gradient(#FFBF00,#FACC2E,#F7D358);
    text-align: center;
    font-family: segoe script;
  }
</style>
<style>
  .hr {
    height: 60px;
    width: 100%;
    background: url('imagenes/lapiz separador 1.png') no-repeat center;
    border: none;
    background-size: 1100px;
  }
</style>
<style>
    .image1{
        cursor: pointer;
        width: 400px;
    }
    .image1:hover{
        -webkit-filter: brightness(60%);
        -o-filter: brightness(60%);
        -ms-filter: brightness(60%);
        -webkit-transition: 700ms;
        -o-transition: 700ms;
        -ms-transition: 700ms;
        transition:700ms;
    }
</style>
<style>
    .display{
        position: fixed;
        right: 10px;
        bottom: -10px;
        width: 120px;
        height: 45px;
        background: rgba(139,139,139,0.9);
        border-radius: 10px;
        font-size: 20px;
        font-family: segoe script;
        src: url("DS-DIGIT.TTP") format("truetype");
        text-align: center;
    }
</style>
<style> 
    .red{
        position: fixed;
        top: 200px;
        z-index: 100;
        left: 0;
    }
    .social div a{
        color: white;
        font-size: 25px;
        text-align: center;
        width: 30px;
        height: 30px;
        padding: 10px 10px 10px 10px;
        display: inline-block;
        text-decoration: none;
    }
    .facebook{
        background: #3b5998;
        border-radius: 0 1rem 0 0;
    }
    .youtube{
        background: #bb0000;
    }
    .googleplus{
        background: #dd4b39;
    }
    .correo{
        background: #666666;
    }
    .telf{
        background: #FE9A2E;
    }
    .mensaje{
        background: skyblue;
        border-radius: 0 0 1rem 0;
       
    }
    .social a:hover{
        width: 70px;
        border-radius: 0 1rem 1rem 0;
        -webkit-transition: 600ms;
        -o-transition: 600ms;
        -ms-transition: 600ms;
    }
    .social div:hover{
        width: 10px;
    }
</style>
<style>
    .btn1{
        background: transparent;
        border: transparent;
    }
</style>
<style>
  .btn {
    background: linear-gradient(#F5D0A9,#F7BE81,#FAAC58,#FE9A2E,#FF8000);
    border: transparent;
    border-radius: 10px;
    cursor: pointer;
    -webkit-transition:all 1s ease-in-out;
    -moz-transition:all 1s ease-in-out;
    -o-transition:all 1s ease-in-out;
    transition:all 1s ease-in-out;
    margin: 5px;
  }
 .btn:hover {
   background: linear-gradient(#A9A9F5,#8181F7,#5858FA,#2E2EFE,#0000FF);
  }
</style>
<style>
body::-webkit-scrollbar-track
{
  box-shadow: inset 0 0 6px rgba(0,0,0,0.6);
 background-color: rgb(191,191,191);
}
body::-webkit-scrollbar
{
    width: 12px;
    background-color: none;
    border: none;
}

body::-webkit-scrollbar-thumb
{
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.6);
    background-color: orange;
}
</style>
<style>
    .image{
        width: 500px;
        cursor: pointer;
    }
    .image:hover{
        -webkit-filter: brightness(60%);
        -o-filter: brightness(60%);
        -ms-filter: brightness(60%);
        -webkit-transition: 700ms;
        -o-transition: 700ms;
        -ms-transition: 700ms;
        transition:700ms;
    }
</style>
<html>
  <head>
    <meta charset="UTF-8">
      <title> 1 ESO A</title>
      <link rel="stylesheet" href="estilos3.css">
      <link rel="stylesheet" href="style.css">
      <script src="//static.donation-tools.org/widgets/v3/modules.min.js"></script>
      <script src="http://code.jquery.com/jquery-latest.js"></script>
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
      <script src="reloj.js"></script>
      <link rel="icon" type="image/ico" href="imagenes/logo_GTE.ico">
  </head>
<script>
$(document).ready(function(){
    var altura = $('.menu').offset().top;
 
    $(window).on('scroll', function(){
        if ( $(window).scrollTop() > altura ){
            $('.menu').addClass('menu-fixed');
        } else {
            $('.menu').removeClass('menu-fixed');
        }
    });

});
</script>
<body style="background-image: url(imagenes/stackofmagazines.jpg); background-repeat: no-repeat; background-attachment: fixed; background-position: center; background-size: cover;" onload="reloj()">
<div class="contenedor">
            <a href="http://www.ies-calvia.260mb.net" style="text-decoration:none;"><img src="imagenes/logo_GTE.png" style="position: absolute; height: 100px; width: 100px"></a>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <nav class="menu">
             <ul>
  <li class="dropdown">
    <a href="http://ies-calvia.260mb.net/GTE/ESO/1_eso" class="dropbtn">1 ESO</a>
    <div class="dropdown-content">
      <a href="#">1º A</a>
      <a href="#">1º B</a>
      <a href="#">1º C</a>
      <a href="#">1º D</a>
      <a href="#">1º E</a>
      <a href="#">1º F</a>
    </div>
  </li>
  <li class="dropdown">
    <a href="http://ies-calvia.260mb.net/GTE/ESO/2_eso" class="dropbtn">2 ESO</a>
    <div class="dropdown-content">
      <a href="#">2º A</a>
      <a href="#">2º B</a>
      <a href="#">2º C</a>
      <a href="#">2º D</a>
      <a href="#">2º E</a>
      <a href="#">2º F</a>
    </div>
  </li>
  <li class="dropdown">
    <a href="http://ies-calvia.260mb.net/GTE/ESO/3_eso" class="dropbtn">3 ESO</a>
    <div class="dropdown-content">
      <a href="#">3º A</a>
      <a href="#">3º B</a>
      <a href="#">3º C</a>
      <a href="#">3º D</a>
      <a href="#">3º E</a>
      <a href="#">3º F</a>
    </div>
  </li>
  <li class="dropdown">
    <a href="http://ies-calvia.260mb.net/GTE/ESO/4_eso" class="dropbtn">4 ESO</a>
    <div class="dropdown-content">
      <a href="#">4º A</a>
      <a href="#">4º B</a>
      <a href="#">4º C</a>
      <a href="#">4º D</a>
      <a href="#">4º E</a>
      <a href="#">4º F</a>
    </div>
</li>
<li style="float:right;"><a href="http://www.ies-calvia.260mb.net"><i class="fa fa-home" style="font-size:25px;"></i></a></li><li style="float:right;"><a href="https://sites.google.com/site/iescalvia/organitzacio/equip" target="_blank">¿Quienes somos?</a></li>
</ul>
            </nav>
    <div class="contenido">
      <br>
      <br>
      <center><font face="segoe script" size="8" color="#666666">1 ESO A</font></center>
      <div class="calendar_div">
        <?php echo getCalender(); ?>
      </div>
      <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <table align="center" class="legenda_calendario" height="20" width="700">
      <th colspan="2" class="subtitulo">Inicio de curso y vacaciones</th>
      <th colspan="3" class="titulo">otros</th>
          <tr>
            <td class="td">Inicio de curso:&nbsp;<canvas height="20" width="20" style="background-color:#F78181; border-radius:5px;"></canvas></td>
            <td class="td">Vacaciones de navidad:&nbsp;<canvas height="20" width="20" style="background-color:#81F781; border-radius:5px;"></canvas></td>
            <td class="td">Hoy:&nbsp;<canvas height="20" width="20" style="background-color:#DDDDDD; border-radius: 5px;"></canvas></td>
          </tr>
          <tr>
           <td class="td">Vacaciones de Pascua:&nbsp;<canvas height="20" width="20" style="background-color:#F2F5A9; border-radius:5px;"></canvas></td>
           <td class="td">Dias festivos:&nbsp;<canvas height="20" width="20" style="background-color:#E2A9F3; border-radius:5px;"></canvas></td>
           <td class="td">eventos:&nbsp;<canvas height="20" width="20" style="background-color:#B9FFFF; border-radius:5px;"></canvas></td>
          </tr>
    </table>
      <div class="red">
            <div class="social">
                <div><a href="https://www.facebook.com/ies.calvia" target="_blank" class="fa fa-facebook-square facebook"></a></div>
                <div><a href="https://www.youtube.com/user/iescalviablog" target="_blank" class="fa fa-youtube-play youtube"></a></div>
                <div><a href="https://plus.google.com/114947718295379948989" target="_blank" class="fa fa-google-plus googleplus"></a></div>
                <div><a href="mailto:iescalvia@gmail.com" class="fa fa-envelope correo"></a></div>
                <div><a href="tel:+34971690229" class="fa fa-volume-control-phone telf" title="+34 971690229"></a></div>
                <div><a href="fax:+34971694931" class="fa fa-fax mensaje" title="+34 971694931"></a></div>
            </div>
    </div>
    <div class="display" id="pantalla" style="z-index: 100;"></div>
            <footer>
        <div style="bottom:500px;">
            <a href="http://moodle2.iescalvia.com/" target="_blank" style="text-decoration: none;">
                <img src="imagenes/moodle.png" style="position: absolute; height: 60px; width: 100px; left: 130px; bottom: -590px;" title="Moodle">
            </a>
            <a href="https://web2.alexiaedu.com/ACWeb/LogOn.aspx?key=WRcKBnV4m3M%3d" target="_blank" style="text-decoration: none;">
                <img src="imagenes/Alexia1.png" style="position: absolute; height: 65px; width: 65px; left: 40px; bottom: -590px;" title="Alexia">
            </a>
            <a href="https://www.bachilleratoartistico-iescalvia.com/" target="_blank" style="text-decoration: none;">
                <img src="imagenes/batart.png" style="position: absolute; height: 60px; width: 60px; left: 250px; bottom: -590px;" title="Bachillerato art&iacute;stico">
            </a>
            <a href="http://iescalviablog.blogspot.com.es/" target="_blank" style="text-decoration: none;">
                <img src="imagenes/pillospress.png" style="position: absolute; height: 70px; width: 180px; left: 330px; bottom: -600px;" title="Pillo's press">
            </a>
            <a href="http://www.cucalvia.com/" target="_blank" style="text-decoration: none;">
                <img src="imagenes/CUC.png" style="position: absolute; height: 60px; width: 70px; left: 530px; bottom: -590px;" title="CUC">
            </a>
            <a href="http://weib.caib.es/" target="_blank" style="text-decoration: none;">
                <img src="imagenes/weib.png" style="position: absolute; height: 60px; width: 150px; left: 600px; bottom: -590px;" title="weib">
            </a>
            <a href="http://iescalvia.blogspot.com.es/" target="_blank" style="text-decoration: none;">
                <img src="imagenes/bloggeries.png" style="position: absolute; height: 60px; width: 150px; left: 40px; bottom: -690px;" title="Informaci&oacute;n del IES Calvi&aacute;">
            </a>
            <a href="http://www.erasmusplus.gob.es/" target="_blank" style="text-decoration: none;">
                <img src="imagenes/erasmus.png" style="position: absolute; height:60px; width: 160px; left: 200px; bottom: -690px;" title="Erasmus">
            </a>
            <a href="https://www3.caib.es/xestib/xestib/menu/iniciGestio" target="_blank" style="text-decoration: none;">
                <img src="imagenes/GESTIB2.0.jpg" style="position: absolute; height:50px; width: 160px; left: 380px; bottom: -690px;" title="GESTIB">
            </a>
        </div>
        <font face="segoe script" size="5" style="position:absolute; bottom:-650px; left:800px;">
            email:<a href="mailto:iescalvia@gmail.com" target="_blank">iescalvia@gmail.com</a>
            <br>
            tel: <a href="tel:+34971690229" target="_blank">971690229</a>
            <br>
            fax: <a href="fax:+34971694931" target="_blank">971694931</a>
        </font>
        <a href="https://sites.google.com/site/iescalvia/organitzacio/equip" target="_blank" style="text-decoration: none;">
            <button class="btn" style="position: absolute; left: 1100px; bottom: -630px;"><font face="segoe script" size="3">&nbsp;&iquest;Quienes somos?</font>&nbsp;&nbsp;<i class="fa fa-users" style="font-size: 30px; color: blue;"></i>&nbsp;&nbsp;&nbsp;&nbsp;</button>
        </a>
        <a href="guia.pdf" download="guia.pdf" style="text-decoration: none;">
            <button class="btn" style="position: absolute; left: 1100px; bottom: -670px;">
                <font face="segoe script" size="3">&nbsp;Gu&iacute;a</font>&nbsp;<i class="fa fa-download" style="font-size: 30px; color: blue;"></i>&nbsp;&nbsp;&nbsp;&nbsp;
            </button>
        </a>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <a href="http://www.ies-calvia.260mb.net/GTE/" style="text-decoration: none;">
            <button class="btn1" style="cursor: pointer; z-index: 100; left: 50%;" title="Volver"><i class="fa fa-arrow-left" style="font-size: 40px; color: orange;"></i></button>
        </a>
      </footer>
    </div>
</body>
</html>


Puse dos <link>:
     
Código:
<link rel="stylesheet" href="estilos3.css">
      <link rel="stylesheet" href="style.css">

Que es de elementos diferentes; uno, es el calendario y el otro es un menu desplegable scroll.

Y abría una manera para solucionar esto?

Gracias
244  Programación / Desarrollo Web / Re: $ is not defined :? en: 18 Julio 2017, 11:35 am
Has incluido JQuery?

Salu2
Como se incluye el jQuery?
245  Programación / Desarrollo Web / $ is not defined :? en: 18 Julio 2017, 10:17 am
Hola foreros, estoy haciendo una barra de navegación ayudándome de un vídeo, y tengo que poner un códiigo javascript
Código javascript :
Código:
$(document).ready(function(){
    var altura = $('.menu').offset().top();

    $(window).on('scroll',function(){
        if ($(window).scrollTop() > altura) {
            $('.menu').addClass('menu-fixed');
        }else{
            $('.menu').removeClass('menu-fixed');
        }
    });
});

Al ejecutar la función me sale que el $ no está definido y me subraya la linea 1 es decir esto:
Código javascript :
Código:
$(document).ready(function(){
¿Porque me dice eso?¿Y como lo podría solucionar?
Gracias
246  Programación / Desarrollo Web / Como poner una fuente de letra descargada en extensión .TTF en: 2 Julio 2017, 10:41 am
Hola estoy haciendo un reloj digital, lo tengo hecho todo pero quisiera cambiar el tipo de letra a DS-DIGIT.TTF (la fuente de letra que tiene los números de los relojes), pero no sé como ponerlo:
Código:
<div class="display" id="pantalla"></div>
Código:
<style>
    .display{
        position: fixed;
        right: 10px;
        bottom: 15px;
        width: 120px;
        height: 40px;
        background: rgba(139,139,139,0.9);
        border-radius: 10px;
        font-size: 20px;
        src: url("DS-DIGIT.TTF") format("truetype");
    }

No me funciona, me sale tipo segoe script, como lo tengo que hace para que me salga
de este tipo de letra?

Gracias
247  Programación / PHP / llamar función php desde caja de texto con onchange en: 24 Junio 2017, 18:21 pm
Hola, estoy continuando con mi proyecto y me he topado con un problemilla, todo va bien en mi formulario, en una parte de mi formulario tengo una caja de texto input tipo url que insertas una url y yo quisiera poner una función que cuando el cliente acabe de escribir la url en el input me diga si esa url es verdadero o falsa y si es falsa me bloquee la función "insertar5.php".

Para ello hice un input y puse en onchange lo siguente:
Código:
<?php
    $url = $_POST['artarea'];
    function url_exists($url) {
        $h = get_headers($url);
        $status = array();
        preg_match('/HTTP\/.* ([0-9]+) .*/', $h[0] , $status);
        return ($status[1] == 200);
    }
    echo url_exists($url)? 'existe' : 'no existe';
?>
<input  type="url" name="artarea" id="artarea" style="opacity: 0.8; border: inset; border-radius: 10px; font-family: segoe script;" required placeholder="Escribe aqu&iacute; el enlace." onpaste="return paste;" oncut="return false;" oncopy="return false;" onchange="<?php echo validar_url(); ?>">

Llama a una función php mediante onchange según lo que he oído está mal el onchange="<?php echo validar_url(); ?>" creo. ¿Y si es así como lo puedo llamar a la función validar_url()?

Gracias
248  Programación / Desarrollo Web / Como separar un formulario de un calendario en: 12 Junio 2017, 12:21 pm
Hola ya tengo el calendario y formulario juntos, pero se ve mal, el calendario esta centrado y el formulario está a la derecha y continua hacia abajo, y lo que quería es dejar un espacio en blanco, separarlo, pero puse las etiquetas <hr>,<br>,&nbsp; y no me funcionan. Como lo hago?

Gracias.
249  Programación / PHP / Hola, hay alguna función que conecte una carpeta (con todos sus ficheros) a un fichero PHP? en: 11 Junio 2017, 21:24 pm
Hola ya hice el calendario!!

El calendario esta separado del formulario, cada una esta, en una carpeta diferente y yo quisiera saber si hay alguna funcion PHP que al ponerlo me conecte el calendario de eventos con el formulario, alguno similar a include pero que conecte toda la carpeta.
250  Programación / Bases de Datos / ¿Como mostrar mis datos de base de datos en el calendario? en: 1 Mayo 2017, 21:31 pm
Hola, soy novato en php y mysql y me gustaría hacer un calendario php mysql, ví el tutorial de https://www.codexworld.com/build-event-calendar-using-jquery-ajax-php/ y me gustó mucho, me arrancó bien pero me gustaría que demostrara mis datos de la DB en el calendario.
Mi tabla es la siguiente:

fechatipoeventootromateriaasuntotareaevento

Yo modifiqué el código:
Código:
<?php
/*
 * Function requested by Ajax
 */
if(isset($_POST['func']) && !empty($_POST['func'])){
switch($_POST['func']){
case 'getCalender':
getCalender($_POST['year'],$_POST['month']);
break;
case 'getEvents':
getEvents($_POST['date']);
break;
default:
break;
}
}

/*
 * Get calendar full HTML
 */
function getCalender($year = '',$month = '')
{
$dateYear = ($year != '')?$year:date("Y");
$dateMonth = ($month != '')?$month:date("m");
$date = $dateYear.'-'.$dateMonth.'-01';
$currentMonthFirstDay = date("N",strtotime($date));
$totalDaysOfMonth = cal_days_in_month(CAL_GREGORIAN,$dateMonth,$dateYear);
$totalDaysOfMonthDisplay = ($currentMonthFirstDay == 7)?($totalDaysOfMonth):($totalDaysOfMonth + $currentMonthFirstDay);
$boxDisplay = ($totalDaysOfMonthDisplay <= 35)?35:42;
?>
<div id="calender_section">
<h2>
        <a href="javascript:void(0);" onclick="getCalendar('calendar_div','<?php echo date("Y",strtotime($date.' - 1 Month')); ?>','<?php echo date("m",strtotime($date.' - 1 Month')); ?>');">&lt;&lt;</a>
            <select name="month_dropdown" class="month_dropdown dropdown"><?php echo getAllMonths($dateMonth); ?></select>
<select name="year_dropdown" class="year_dropdown dropdown"><?php echo getYearList($dateYear); ?></select>
            <a href="javascript:void(0);" onclick="getCalendar('calendar_div','<?php echo date("Y",strtotime($date.' + 1 Month')); ?>','<?php echo date("m",strtotime($date.' + 1 Month')); ?>');">&gt;&gt;</a>
        </h2>
<div id="event_list" class="none"></div>
<div id="calender_section_top">
<ul>
<li>Domingo</li>
<li>Lunes</li>
<li>Martes</li>
<li>Mi&eacute;rcoles</li>
<li>Jueves</li>
<li>Viernes</li>
<li>S&aacute;bado</li>
</ul>
</div>
<div id="calender_section_bot">
<ul>
<?php
$dayCount = 1;
for($cb=1;$cb<=$boxDisplay;$cb++){
if(($cb >= $currentMonthFirstDay+1 || $currentMonthFirstDay == 7) && $cb <= ($totalDaysOfMonthDisplay)){
//Current date
$currentDate = $dateYear.'-'.$dateMonth.'-'.$dayCount;
$eventNum = 0;
//Include db configuration file
include 'dbConfig.php';
//Get number of events based on the current date
$result = $db->query("SELECT fecha FROM 1esoacalendar WHERE date = '".$currentDate."' AND status = 1");
$eventNum = $result->num_rows;
//Define date cell color
if(strtotime($currentDate) == strtotime(date("Y-m-d"))){
echo '<li date="'.$currentDate.'" class="grey date_cell">';
}elseif($eventNum > 0){
echo '<li date="'.$currentDate.'" class="light_sky date_cell">';
}else{
echo '<li date="'.$currentDate.'" class="date_cell">';
}
//Date cell
echo '<span>';
echo $dayCount;
echo '</span>';
//Hover event popup
echo '<div id="date_popup_'.$currentDate.'" class="date_popup_wrap none">';
echo '<div class="date_window">';
echo '<div class="popup_event">Eventos ('.$eventNum.')</div>';
echo ($eventNum > 0)?'<a href="javascript:;" onclick="getEvents(\''.$currentDate.'\');">Ver eventos</a>':'';
echo '</div></div>';
echo '</li>';
$dayCount++;
?>
<?php }else{ ?>
<li><span>&nbsp;</span></li>
<?php } } ?>
</ul>
</div>
</div>

<script type="text/javascript">
function getCalendar(target_div,year,month){
$.ajax({
type:'POST',
url:'functions.php',
data:'func=getCalender&year='+year+'&month='+month,
success:function(html){
$('#'+target_div).html(html);
}
});
}
function getEvents(date){
$.ajax({
type:'POST',
url:'functions.php',
data:'func=getEvents&date='+date,
success:function(html){
$('#event_list').html(html);
$('#event_list').slideDown('slow');
}
});
}
function addEvent(date){
$.ajax({
type:'POST',
url:'functions.php',
data:'func=addEvent&date='+date,
success:function(html){
$('#event_list').html(html);
$('#event_list').slideDown('slow');
}
});
}
$(document).ready(function(){
$('.date_cell').mouseenter(function(){
date = $(this).attr('date');
$(".date_popup_wrap").fadeOut();
$("#date_popup_"+date).fadeIn();
});
$('.date_cell').mouseleave(function(){
$(".date_popup_wrap").fadeOut();
});
$('.month_dropdown').on('change',function(){
getCalendar('calendar_div',$('.year_dropdown').val(),$('.month_dropdown').val());
});
$('.year_dropdown').on('change',function(){
getCalendar('calendar_div',$('.year_dropdown').val(),$('.month_dropdown').val());
});
$(document).click(function(){
$('#event_list').slideUp('slow');
});
});
</script>
<?php
}

/*
 * Get months options list.
 */
function getAllMonths($selected = ''){
$options = '';
for($i=1;$i<=12;$i++)
{
$value = ($i < 10)?'0'.$i:$i;
$selectedOpt = ($value == $selected)?'selected':'';
$options .= '<option value="'.$value.'" '.$selectedOpt.' >'.date("F", mktime(0, 0, 0, $i+1, 0, 0)).'</option>';
}
return $options;
}

/*
 * Get years options list.
 */
function getYearList($selected = ''){
$options = '';
for($i=2015;$i<=2025;$i++)
{
$selectedOpt = ($i == $selected)?'selected':'';
$options .= '<option value="'.$i.'" '.$selectedOpt.' >'.$i.'</option>';
}
return $options;
}

/*
 * Get events by date
 */
function getEvents($date = ''){
//Include db configuration file
include 'dbConfig.php';
$eventListHTML = '';
$date = $date?$date:date("Y-m-d");
//Get events based on the current date
$result = $db->query("SELECT * FROM 1esoacalendar WHERE date = '".$date."' AND fecha = 1");
if($result->num_rows > 0){
$eventListHTML = '<h2>Eventos en '.date("l, d M Y",strtotime($date)).'</h2>';
$eventListHTML .= '<ul>';
while($row = $result->fetch_assoc()){
            $eventListHTML .= '<li>'.$row['tipoevento'].'</li>';
            $eventListHTML .= '<li>'.$row['otro'].'</li>';
            $eventListHTML .= '<li>'.$row['materia'].'</li>';
            $eventListHTML .= '<li>'.$row['asunto'].'</li>';
            $eventListHTML .= '<li>'.$row['tarea'].'</li>';
            $eventListHTML .= '<li>'.$row['evento'].'</li>';
        }
$eventListHTML .= '</ul>';
}
echo $eventListHTML;
}
?>

pero no me va, el calendario arranca pero no me muestra los eventos.

Atentamente IVÁN HEREDIA PLANAS. Gracias.
Páginas: 1 ... 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 [25] 26 27 28 29
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines