Carta publicada en el diario El Mercurio el domingo pasado.
Pablo Varas @ 16-01-2009 16:35
La elección CAi se realizaría el 4 y 5 de Noviembre, si este viernes no se han presentado dos listas para CAi y dos candidatos para Consejero Académico. La elección FEUC se realizará los días 5 y 6 de Noviembre.
Mira la noticia para ver la conformación de ambos TRICEL.
Feña R @ 16-10-2008 13:07
require_once('comun.inc.php');
/*
editado por Felipe Brahm para que funcione con español :-)
*/
//v0.52: Bugfix for the correct time.
//v0.51: Small change with Google's date (the 'GMT' appears to have gone); debug mode
//v0.5: Fix for new Google date. Also means this now copes with... times. Yay!
//v0.41: moving location of simplepie to the configuration section: thanks Greg
//v0.4: rewrite, to use simplepie
// Your Gmail address
if(isset($google_calendar_mail))
$gmail = $google_calendar_mail;
else
$gmail = "calendario.cai@gmail.com";
// Date format you want your details to appear
$dateformat="j F, Y: g.ia"; // Thursday, 10 March - see http://www.php.net/date for details
// Cache location for your XML file
$cache_location = SSM_REAL_PATH . 'rssCache/calendario/';
$cache_max_minutes = 15;
// Here is where your copy of Simplepie lives
require('simplePie/simplepie.inc');
// Change this to 'true' to see some debug code
$debug_mode = false;
if ($debug_mode) {echo "
Debug mode is on.
";}
$days_before = 0;
$show_days = 30;
$show_months = 0;
$show_years = 0;
$max_results = 15;
$show_year_on_date = false;
if (!empty($query_string))
$query = "&q=" . urlencode($query_string);
else
$query = "";
$calendar_xml_address = "http://www.google.com/calendar/feeds/" . $gmail
. "/public/basic?orderby=starttime&sortorder=a&start-min=" . date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-$days_before, date("Y"))) . "&start-max="
. date("Y-m-d",mktime(0, 0, 0, date("m")+$show_months, date("d")+$show_days, date("Y")+$show_years))
. "&max-results=" . $max_results . $query;
//echo $calendar_xml_address;
if ($debug_mode) {echo "
Getting XML feed
";}
$feed = new SimplePie();
$feed->feed_url($calendar_xml_address);
$feed->cache_max_minutes($cache_max_minutes);
$feed->cache_location($cache_location);
$feed->order_by_date(false);
$feed->init();
$mesesCompletos = array (
'ene' => 'Enero',
'feb' => 'Febrero',
'mar' => 'Marzo',
'abr' => 'Abril',
'may' => 'Mayo',
'jun' => 'Junio',
'jul' => 'Julio',
'ago' => 'Agosto',
'sep' => 'Septiembre',
'oct' => 'Octubre',
'nov' => 'Noviembre',
'dec' => 'Diciembre'
);
$diasCompletos = array (
'lun' => 'Lunes',
'mar' => 'Martes',
'mié' => 'Miércoles',
'jue' => 'Jueves',
'vie' => 'Viernes',
'sáb' => 'Sábado',
'dom' => 'Domingo',
);
$mesesPorNumero = array (
1 => 'Enero',
2 => 'Febrero',
3 => 'Marzo',
4 => 'Abril',
5 => 'Mayo',
6 => 'Junio',
7 => 'Julio',
8 => 'Agosto',
9 => 'Septiembre',
10 => 'Octubre',
11 => 'Noviembre',
12 => 'Diciembre'
);
/*
$meses = array (
'ene' => 'Jan',
'feb' => 'Feb',
'mar' => 'Mar',
'abr' => 'Apr',
'may' => 'May',
'jun' => 'Jun',
'jul' => 'Jul',
'ago' => 'Aug',
'sep' => 'Sep',
'oct' => 'Oct',
'nov' => 'Nov',
'dec' => 'Dec'
);
*/
if((($items = $feed->get_items()) !== FALSE) && is_array($items)) {
foreach($items as $item) {
if ($debug_mode) { echo "
Item found
"; }
// Extract the 'when' information from the item summary, and ignore everything else
//$from = mb_convert_encoding( utf8_decode( $item->get_description() ), 'ISO-8859-1'); //si ESTE archivo no está en Unicode
$from = $item->get_description();
//echo '
DEBUG - $fom: begin-'.$from.'-end
';
/*
$fecha = substr($from, strpos($from, 'Cu ndo: ') + strlen('Cundo: '));
$fecha = substr($fecha, 0, strpos($fecha, '<br>'));
$fecha = str_replace(array('de ', 'del '), '', $fecha);
if(strpos($fecha, ' al ') !== FALSE)
$fecha = substr($fecha, 0, strpos($fecha, ' al ') - strlen(' 00:00'));
$day_of_week = substr($fecha, 0, 3);
$year = substr($fecha, -4);
$fecha = substr($fecha, 4, -5);
$month = substr($fecha, -3);
$day = substr($fecha, 0, strpos($fecha, $month)-1);
$month = $meses[$month];
//$time = strtotime(trim(substr($from,0,20)));
$time = strtotime("$day $month $year");
*/
if(strpos($from, 'Cuándo: ') !== FALSE) {
$fecha = substr($from, strpos($from, 'Cuándo: ') + strlen('Cuándo: '));
//$fecha = substr($fecha, 0, strpos($fecha, '<br>'));
$fecha = str_replace(array(' '), '', $fecha);
$fecha = substr($fecha, 0, strpos($fecha, '
get_description();
$where = substr($where,strpos($where,"Dónde: ")+6);
$where = trim(substr($where,0,strpos($where,"<")));
if (substr($where,0,2)=="20") {$where = "";} // If there's no location, just ignore it
*/
// Extract the link for Google Calendar
$url = $item->get_links();
//$title = ssm_encoding(mb_convert_encoding( utf8_decode( $item->get_title() ), 'ISO-8859-1')); //si ESTE archivo no está en Unicode
$title = $item->get_title();
// Stick into a nice array
$bookings[] = array('time'=>$time, 'where'=>$where, 'title'=>$title, 'url'=>$url[0]);
}
// Sort the bookings into time order
//sort($bookings);
if(isset($bookings) && is_array($bookings)) {
foreach($bookings as $booking) {
printHTML ('
'. $booking['title'] .'
'.
'
'.
$booking['time'].
''.
'
'
);
// if ($booking['where']) {echo "
".$booking['where'];}
}
}
} //if(get_items() !== FALSE)
?>