/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------
| Event Calendar Infusion v1.00
| © Giuseppe Nichelini (nick56) 2004
| http://www.nichelini.it
| giuseppe@nichelini.it
---------------------------------------------------*/
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."event_calendar_panel/locale/".$settings['locale'].".php")) {
// Load the locale file matching the current site locale setting.
include INFUSIONS."event_calendar_panel/locale/".$settings['locale'].".php";
} else {
// Load the infusion's default locale file.
include INFUSIONS."event_calendar_panel/locale/English.php";
}
if (($dd <> "") && ($mm <> "") && ($yy <> "")) {
if ((substr($dd,0,1) <> "0") AND ($dd < 10)) { $dd = "0".$dd; }
$data = $yy."/".$mm."/".$dd;
$timestamp = mktime(0,0,0,intval($mm),intval($dd),intval($yy));
}
else {
$data = date("Y/m/d",time());
$datatmp = explode("/",$data);
$timestamp = mktime(0,0,0,intval($datatmp[1]),intval($datatmp[2]),intval($datatmp[0]));
$dd = $datatmp[2];
$mm = $datatmp[1];
$yy = $datatmp[0];
}
$month = $mm;
$year = $yy;
$today = getdate();
$month = $month ? $month : $today['mon'];
$year = $year ? $year : $today['year'];
$lastyear = ($month==1) ? $year-1 : $year;
$lastmonth = ($month==1) ? 12 : $month-1;
$nextyear = ($month==12) ? $year+1 : $year;
$nextmonth = ($month==12) ? 1 : $month+1;
opentable($locale['Cal103']);
$DATA = $yy."-".$mm."-".$dd;
$result = dbquery("SELECT * FROM ".$db_prefix."events WHERE event_data='$DATA' AND event_deleted='NO' ORDER BY event_orario ASC, idx ASC");
$rows = dbrows($result);
echo "
\n";
if ($rows != 0) {
echo "";
echo "".$locale['Cal105']." | \n";
echo "".$locale['Cal111']." | \n";
echo "".$locale['Cal107']." | \n";
echo "
";
while($data = dbarray($result)) {
$ora = ($data[event_orario]=="00:00:00")?($locale['Cal132']):($data[event_orario]);
echo "";
echo "".$ora." | \n";
echo "".$data[event_titre]." | \n";
echo "".nl2br(parseubb($data[event_texte]))." | \n";
echo "
";
}
} else {
echo "".$locale['Cal108']." |
\n";
}
echo "
";
tablebreak();
$result = dbquery("SELECT event_note FROM ".$db_prefix."events WHERE event_data='$DATA' AND event_deleted='NO' ORDER BY event_orario ASC, idx ASC");
$rows = dbrows($result);
if ($rows != 0) {
echo "\n";
while($note = dbarray($result)) {
if ($note[event_note] <> "") {
echo "• ".parseubb($note[event_note])." |
\n";
}
}
echo "
\n";
}
closetable();
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>