<?php
include 'lib_phpgcalendar.php';

/*procesamos envio*/
if(count($_POST)){

    
$gcal1 = new PHPGCalendar($_POST['Email'],$_POST['Passwd'] );
    
$gcal1->new_event($_POST['asunto'],$_POST['dia'],$_POST['hora'],$_POST['memo']);



}
/*solicitamos datos de evento*/


?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html><head><title>Pasarela PHP a Google Calendar (v.1.0)</title>
<script language="javascript" src="http://www.arrozconnori.net/stats/php-stats.js.php"></script>
<META HTTP-EQUIV="CONTENT-TYPE"CONTENT="TEXT/HTML;CHARSET=ISO-8859-1">
<style type="text/css">
    
    
    body {

        font-family:verdana, arial, helvetica, sans-serif;

        }

    a {
    color:#09c;
    font-size:11px;
    text-decoration:none;
    font-weight:600;
    font-family:verdana, arial, helvetica, sans-serif;
    }
a:link {color:#09c;}
a:visited {color:#07a;}
a:hover {background-color:#eee;}
    #contentright p { font-size:10px}
    
    i{
    font-size:9px;
    }
</style>
</head><body>


    <h2>PHPGCalendar v1.1</h2>
    <p>Ejemplo de integración entre PHP y el nuevo formato de sindicación de Google Calendar <a href="http://code.google.com/apis/gdata/calendar.html">Gdata</a>. Se han utilizado 
    para la consultas HTTP las librerias de PHP <a href="http://es2.php.net/manual/es/ref.curl.php">CURL</a>.</p>

    
    <pre>
    <?php
        
if(isset($gcal1)){
    
            
print_r($gcal1->debug_output);

        }
    
?>
    </pre>
    </div>
    

    
        <h1>Menu</h1>
        <ul>
    <li><a href="lib_phpgcalendar_source.php">código fuente libreria</a></li>
    <li><a href="index_source.php">código fuente formulario</a></li>
    </ul>
    


        <h2>Nuevo Evento:</h2>
        <h1>Datos de la cuenta Gmail</h1>
            <form name="form_event" method="post" action="index.php">
            <p>Email</p><p><input type="text" name="Email" value=""></p>
            <p><i>(nuestra cuenta de correo incluyendo '@gmail.com')</i></p>
            <p>Passwd</p><p><input type="password" name="Passwd" value=""></p>
            
        <h1>Datos del evento</h1>        
        <p>Evento</p><p><input type="text" name="asunto" value="evento XXX" /></p>
            
            <p>Donde</p><p><input type="text" name="donde" value="valencia, spain" /></p>
            <p><i>(en el formato de <a href="http://maps.google.com/support?hl=es">google maps</a> )</i></p>
            
            <p>Dia (yyyy-mm-dd)</p><p><input type="text" name="dia" value="<?php echo date("Y-m-d"); ?>" /></p>            
            <p>hora(hh:mm)</p><p><input type="text" name="hora" value="<?php echo date("H:i"); ?>" /></p>
            <p>Descripción : </p><p>     <TEXTAREA name="memo" rows="10">contenido descriptivo del evento</TEXTAREA></p>
            <p><input type="submit" value="Enviar" /></p>
            </form>



</body>
</html>