 |
| Modules |  |
| Who's Online |  |
There are currently, 1 guest(s) and 0 member(s) that are online.
You are Anonymous user. You can register for free by clicking here | |
| Languages |  |
|
Select Interface Language:
| | /************************************************************************/
/* NuCalendar */
/* =========================== */
/* */
/* Copyright (c) 2003 by Bill Smith */
/* http://www.vettesofthetropics.com */
/* */
/* Based on Web Calendar */
/* Copyright (c) 2001 by Proverbs, LLC */
/* http://www.proverbs.biz */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
//
// ---------- TWEAKED BY NUKEKOREA DEV. NETWORK (WWW.NUKEKOREA.NET) ---------------
//
/*
* 2001 Proverbs, LLC. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it withthe following stipulations:
* Changes or modifications must retain all Copyright statements, including, but not limited to the Copyright statement
* and Proverbs, LLC homepage link provided at the bottom of this page.
*/
if (eregi("block-Upcoming_Events.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
require_once("modules/NuCalendar/dbaccess.inc.php");
require_once("modules/NuCalendar/datefuncs.php");
require_once("modules/NuCalendar/printevent.php");
$content = "";
$numFound = 0;
$numDaysTested = 0;
$ulmonth = date("m");
$ulmonth++;
$ulmonth--;
$ulyear = date("Y");
$ulday = date("d");
$ulday++;
$ulday--;
global $dbi, $user_prefix;
$caloptions = sql_query("SELECT * FROM ".$user_prefix."_nucal_options WHERE 1", $dbi);
$caloptionrow = sql_fetch_array($caloptions, $dbi);
$maxFound = $caloptionrow[show_n_events];
$maxDaysTested = $caloptionrow[in_n_days];
function DisplayEventsCategory($myrow)
{
global $user_prefix, $dbi;
$result = sql_query("SELECT * FROM ".$user_prefix."_nucal_categories WHERE id='$myrow[categoryid]'", $dbi);
$rtnVal = 0;
$catrow = sql_fetch_array($result, $dbi);
return $catrow[showinblock];
}
function DisplayInfo($ulmonth, $ulday, $ulyear, $myrow)
{
$rtnVal = "";
$rtnVal .= "| "
. "" . GetMonthDayText($ulmonth, $ulday) . " "
. " | "
. "" . PrintShortEvent($myrow, $ulmonth, $ulday, $ulyear).""
. " | ";
return $rtnVal;
}
while ($numFound < $maxFound && $numDaysTested < $maxDaysTested) {
$uldayofweek = date("w", mktime(0, 0, 0, $ulmonth, $ulday, $ulyear));
if ($caloptionrow[show_bydate_in_block] == 1) {
$resultID = Calendar_GetByDate($ulmonth, $ulday, $ulyear);
if ($resultID) {
$nr = sql_num_rows($resultID, $dbi);
for ($k=0;$k<$nr;$k++)
{
$myrow = sql_fetch_array($resultID, $dbi);
if ($numFound < $maxFound) {
if (DisplayEventsCategory($myrow)) {
$content.= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
$numFound++;
}
}
}
}
}
if ($caloptionrow[show_yearly_in_block] == 1) {
$resultID = Calendar_GetYearly($ulmonth, $ulday);
if ($resultID) {
$nr = sql_num_rows($resultID, $dbi);
for ($k=0;$k<$nr;$k++)
{
$myrow = sql_fetch_array($resultID, $dbi);
if ($numFound < $maxFound) {
if (DisplayEventsCategory($myrow)) {
$content.= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
$numFound++;
}
}
}
}
}
if ($caloptionrow[show_yearly_recurring_in_block] == 1) {
$resultID = Calendar_GetYearlyRecurring($ulmonth, $uldayofweek);
if ($resultID) {
$nr = sql_num_rows($resultID, $dbi);
for ($k=0;$k<$nr;$k++)
{
$myrow = sql_fetch_array($resultID, $dbi);
$test = $ulday / 7;
$period = $myrow[recur_period];
if ($period == 5)
$period = NumDotWInMonth($uldayofweek, $ulmonth, $ulyear);
$periodlow = $period - 1;
if ($test <= $period && $test > $periodlow) {
if ($numFound < $maxFound) {
if (DisplayEventsCategory($myrow)) {
$content .= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
$numFound += 1;
}
}
} else if ($period == 5 && $test >= 4 && $day+7 < NumDaysInMonth($month, $year)) {
if ($test <= ($period-1) && $test > ($periodlow-1)) {
if ($numFound < $maxFound) {
if (DisplayEventsCategory($myrow)) {
$content .= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
$numFound += 1;
}
}
}
}
}
}
}
if ($caloptionrow[show_monthly_in_block] == 1) {
$resultID = Calendar_GetMonthly($ulday);
if ($resultID) {
$nr = sql_num_rows($resultID, $dbi);
for ($k=0;$k<$nr;$k++)
{
$myrow = sql_fetch_array($resultID, $dbi);
if ($numFound < $maxFound) {
if (DisplayEventsCategory($myrow)) {
$content.= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
$numFound++;
}
}
}
}
}
if ($caloptionrow[show_monthly_recurring_in_block] == 1) {
$resultID = Calendar_GetMonthlyRecurring($uldayofweek);
if ($resultID) {
$nr = sql_num_rows($resultID, $dbi);
for ($k=0;$k<$nr;$k++)
{
$myrow = sql_fetch_array($resultID, $dbi);
$period = $myrow[recur_period];
if ($period == 5)
$period = NumDotWInMonth($uldayofweek, $ulmonth, $ulyear);
$test = $ulday / 7;
$periodlow = $period - 1;
if ($test <= $period && $test > $periodlow)
{
if ($numFound < $maxFound) {
if (DisplayEventsCategory($myrow)) {
$content.= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
$numFound += 1;
}
}
}
}
}
}
if ($caloptionrow[show_weekly_in_block] == 1) {
$resultID = Calendar_GetWeekly($uldayofweek);
if ($resultID) {
$nr = sql_num_rows($resultID, $dbi);
for ($k=0;$k<$nr;$k++)
{
$myrow = sql_fetch_array($resultID, $dbi);
if ($numFound < $maxFound) {
if (DisplayEventsCategory($myrow)) {
$content.= DisplayInfo($ulmonth, $ulday, $ulyear, $myrow);
$numFound++;
}
}
}
}
}
NextDay($ulmonth, $ulday, $ulyear);
$numDaysTested += 1;
}
$content .= " ";
?>| Upcoming Events |  |
|
There isn't content right now for this block. | |
|  |
Welcome to ConQbyne
This site is all about my arts and crafts passions.
I want to share my work, show off the talent of family and friends, and offer tips, techniques, ideas and information which will help you enjoy this passion too.
Please come in, take a trawl around. I trust you will find something to attract, entertain or teach you.
You see me here - Slave to the Art.
|
|
|  |
| Survey |  |
| Login |  |
Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name. | |
| Big Story of Today |  |
|
There isn't a Biggest Story for Today, yet. | |
| Old Articles |  |
|
There isn't content right now for this block. | |
| Information |  |
| 
|