Rotary Clube de Loulé

Eventos Ano Rotário

0) { foreach($alvo as $chave => $d) { if ($d == $mes) { $campo ="mes".($chave+1); $tt = mysql_result($rr,0,"$campo"); break; } } } return($tt); } //saber mês actual $mes_actual = date("n"); if ($mes_actual < 7) { $i_ano = date("Y-m-d",mktime(0,0,0,7,1,date("Y")-1)); $f_ano = date("Y-m-d",mktime(0,0,0,6,30,date("Y"))); } else { $i_ano = date("Y-m-d",mktime(0,0,0,7,1,date("Y"))); $f_ano = date("Y-m-d",mktime(0,0,0,6,30,date("Y")+1)); } $query = "SELECT * from rotary_anos where inicio='$i_ano' and fim='$f_ano'"; $result = mysql_query($query); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); $i = explode("-",$row["inicio"]); $f = explode("-",$row["fim"]); $id_ano = $row["id"]; echo "

Eventos para ".$i[0]."/".$f[0]."

"; //$q = "SELECT DISTINCT EXTRACT(YEAR_MONTH from data) as mes from rotary_eventos where entidade='1' and id_ano='$id_ano' and EXTRACT(MONTH from data) = '$mes_actual' order by data DESC"; $q = "SELECT DISTINCT EXTRACT(YEAR_MONTH from data) as mes from rotary_eventos where entidade='1' and id_ano='$id_ano' order by data DESC"; $r = mysql_query($q); //mail("webmaster@ideiasfrescas.com","DEBUG",var_export($q,true)); while ($rw = mysql_fetch_array($r)) { $mtit = find_mes($id_ano,$rw["mes"]); $mes = $rw["mes"]; $mes = strftime("%B %Y",mktime(0,0,0,substr($mes,-2),1,substr($mes,0,4))); if(substr($mes,0,3) == "Jun") { $mtit = "- $mes1"; } else { if(substr($mes,0,3) == "Jul") { $mtit = "- $mes2"; } } //$qs = "SELECT * from rotary_eventos where EXTRACT(YEAR_MONTH from data) = '".$rw["mes"]."' and entidade='1' and EXTRACT(MONTH from data) = '$mes_actual' order by data ASC"; $qs = "SELECT * from rotary_eventos where EXTRACT(YEAR_MONTH from data) = '".$rw["mes"]."' and entidade='1' order by data ASC"; $rs = mysql_query($qs); if (mysql_num_rows($rs) > 0) { echo "

$mes $mtit

"; } while ($rws = mysql_fetch_array($rs)) { $t = explode("-",$rws["data"]); $data = strftime("%e de %B - %Y",mktime(0,0,0,$t[1],$t[2],$t[0])); echo "
"; echo "

$data

"; echo "

".$rws["titulo"]."

"; if ($rws["local"] != "") { echo "

Local: ".$rws["local"]."

"; } if ($rws["hora"] != "") { echo "

Hora: ".$rws["hora"]."

"; } echo "

ver mais

"; echo "
"; } } } ?>

Próximos Eventos

= '$date' and entidade='1' order by data ASC LIMIT 3"; $result = mysql_query($query); ?>

Ver todos os Eventos do Ano Rotário

1) { $classe = "misc"; //$classe = ""; } else { if (mysql_num_rows($result) > 0) { $ent = mysql_result($result,0,"entidade"); if ($ent == "1") { $classe = "rotary"; } if ($ent == "2") { $classe = "rotakid"; } if ($ent == "3") { $classe = "rotaract"; } } } return($classe); } $calendar = ""; $day_names = array(); for($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400) $day_names[$n] = ucfirst(gmstrftime('%A',$t)); list($mes_actual, $ano_actual, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month)); $weekday = ($weekday + 7 - $first_day) % 7; if($weekday > 0) $calendar .= ''; for($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){ if($weekday == 7){ $weekday = 0; $calendar .= "\n"; } //procurar os valores na base de dados. $classe = obter_eventos($day,$mes_actual,$ano_actual); if(isset($days[$day]) and is_array($days[$day])){ //@list($link, $classes, $content) = $days[$day]; //if(is_null($content)) $content = $day; $calendar .= ""; } else $calendar .= ""; } if($weekday != 7) $calendar .= ''; echo $calendar."\n\n"; ?>
Calendário de Eventos
<< >>
<< >>
S T Q Q S S D
 
E$day 
Legenda
  Vários eventos
  Evento Rotary