Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Event Calender


FastEddy

Recommended Posts

I would like a calendar of events into my Webshop but the local versions do not work it oscommerce rc2.

Does somebody know a working version?

Indulgence for my bad English ;)

 

ludus

Hungary

Link to comment
Share on other sites

  • 2 weeks later...
PLEASE CAN SOMEONE HELP ME....

 

I've installed the Event Calendar and whilst it looks great... it doesn't work correctly. My immediate problems are:

 

1. In the iframe/info box when I click either < or > to move to the next month it just defaults to December everytime.

 

2. I am able to enter Events via Admin and when I call them from catalog site they display the text heading of the event but I can not click on the event to obtain more information.

 

3. I'm unable to delete an event via Admin - I click the delete button but nothing deletes.

 

I have been struggling with this problem for months and I have updated to various versions of the contribution to no avail, I have read countless forum postings but haven't come across anyone mention these type of issues.

 

However what I have concluded is that it MAY have something to do with Register Globals which I set to OFF via the Register Global contribution at my intital install. I have read that this can often be the problem why many contributions do not work. ??

 

I really do not know if this is an issue and some guidance would be helpful please. I have read the fix in Register Globals regarding OTHER_CONTRIBUTIONS re: Annoy_factor etc but I just don't get it, can not work out what I am meant to do and of course I don't know if this is indeed the problem??

 

Please if anyone reading this thinks they understand my problem, any assistance would be appreciated.

 

Thanks

Leigh B)

 

Did you get this resolved? I just installed the version dated 1 May 2007 and am getting the same issues you have reported. Not able to delete the events in Admin and when I navigate to the site, issue 1 and 2 you reported above are also encountered. Has anyone got this working with Register Globals = off?

Link to comment
Share on other sites

Hey

 

We're also unable to delete events ocne they have been added. Also when clicking on any highlighted date it takes us to a page titled November 30, 1999 :(

 

Alex

 

Did you ever get this resolved? I see a couple folks on this board have this issue which may be related to Register Globals being turned off. I am also running into the exact same issue.

Link to comment
Share on other sites

I hope someone can help me with this please. I've installed the most recent version which seems to work fine. I can add events in admin and see them listed in the main list of events, but then when I try to click on a particular event, I get a blank page. I'm sure it must be an easy fix since the rest of the contribution seems to work fine. Any ideas?

 

Here's the link: http://www.polishpottery.ch/events_calenda...view=all_events

 

Karim

Link to comment
Share on other sites

  • 4 weeks later...

I keep getting the Parse error: parse error, unexpected T_REQUIRE in /xxx/xxx/xxx/catalog/events_calendar.php on line 1 error that everyone keeps talking about, I have the newest RC and the only solution I have heard, it "tired an older package". After 5 hours, and several "older packages" I'm getting kind of frustrated! Can someone help me?

 

I've poured through my code to make sure I didn't forget to copy a ";" anywhere. Since its on every single file pertaining to do withthis mod, I'm assuming its the highest level file in the mod, which they all reference, any ideas?

Edited by killerbuzz
Link to comment
Share on other sites

  • 3 weeks later...

Hi there,

 

I am having the exact same problems as thlatte. Does anybody know how to resolve these issues?

 

My time zone is set to New Zealand.

 

1. "In the iframe/info box when I click either < or > to move to the next month it just defaults to December everytime."

 

2. "I am able to enter Events via Admin and when I call them from catalog site they display the text heading of the event but I can not click on the event to obtain more information."

 

3. "I'm unable to delete an event via Admin - I click the delete button but nothing deletes."

 

This is an awesome contribution but I am unable to use it due to the above problems. Any assistance would be much appreciated.

 

Rudi

 

(thlatte @ May 5 2007, 05:00 AM)

PLEASE CAN SOMEONE HELP ME....

 

I've installed the Event Calendar and whilst it looks great... it doesn't work correctly. My immediate problems are:

 

1. In the iframe/info box when I click either < or > to move to the next month it just defaults to December everytime.

 

2. I am able to enter Events via Admin and when I call them from catalog site they display the text heading of the event but I can not click on the event to obtain more information.

 

3. I'm unable to delete an event via Admin - I click the delete button but nothing deletes.

 

I have been struggling with this problem for months and I have updated to various versions of the contribution to no avail, I have read countless forum postings but haven't come across anyone mention these type of issues.

 

However what I have concluded is that it MAY have something to do with Register Globals which I set to OFF via the Register Global contribution at my intital install. I have read that this can often be the problem why many contributions do not work. ??

 

I really do not know if this is an issue and some guidance would be helpful please. I have read the fix in Register Globals regarding OTHER_CONTRIBUTIONS re: Annoy_factor etc but I just don't get it, can not work out what I am meant to do and of course I don't know if this is indeed the problem??

 

Please if anyone reading this thinks they understand my problem, any assistance would be appreciated.

 

Thanks

Leigh

 

Did you get this resolved? I just installed the version dated 1 May 2007 and am getting the same issues you have reported. Not able to delete the events in Admin and when I navigate to the site, issue 1 and 2 you reported above are also encountered. Has anyone got this working with Register Globals = off?
Link to comment
Share on other sites

Register Globals is the answer! Thank you thlatte. You gave me the hint I needed.

Register Globals are turned on through your host (I use godaddy) I had to open my php.ini file and change the "off" to "on".

 

It works perfectly now.

Curt

Link to comment
Share on other sites

  • 3 weeks later...

Hello, I am still not able to get this working. I have changed the Reigster Globals to "on" and I am still not able to delete any events from the admin pages. also when you click on the < or > I still get december only. When I try to select the month, no matter what month I choose the left calendar shows July and the center of the page show December.

 

PLEASE, PLEASE help this has been driving me crazy for a couple of hours now and I am starting to pull my hair out (and I have very little left so I would like to keep what I have).

 

I also use Godaddy

Thank you.

 

Register Globals is the answer! Thank you thlatte. You gave me the hint I needed.

Register Globals are turned on through your host (I use godaddy) I had to open my php.ini file and change the "off" to "on".

 

It works perfectly now.

Curt

Link to comment
Share on other sites

  • 3 weeks later...

Hi there, I installed the latest events calendar module(posted by eurolife, May 2007), it is really a great contribution, and seems to work fine for the most part. I did encounter two issues which I resolved after reading through forum posts. However, I recently noticed the following issue: I installed the events calendar as an infobox in the left column of the catalog section. when the month is March, or August, or November for this year 2008, the bottom row of the calendar, i.e. the select menus and buttons, cannot be displayed properly(they seem to disappear). I read through the forum posts but cannot find any solution. Post #195 seemed to refer to this same issue but I did not find any replies to his question. I noticed that all these 3 months have 6 rows instead of 5 rows of dates being displayed, I suspect this should have something to do with the problem. I tried to look into the code but could not find anything useful.

 

I wonder why so few people mentioned this issue..I really would like to have this module being used on my site. Any help on this issue will be greatly appreciated....Many thanks in advance!!

Link to comment
Share on other sites

Hi there, I installed the latest events calendar module(posted by eurolife, May 2007), it is really a great contribution, and seems to work fine for the most part. I did encounter two issues which I resolved after reading through forum posts. However, I recently noticed the following issue: I installed the events calendar as an infobox in the left column of the catalog section. when the month is March, or August, or November for this year 2008, the bottom row of the calendar, i.e. the select menus and buttons, cannot be displayed properly(they seem to disappear). I read through the forum posts but cannot find any solution. Post #195 seemed to refer to this same issue but I did not find any replies to his question. I noticed that all these 3 months have 6 rows instead of 5 rows of dates being displayed, I suspect this should have something to do with the problem. I tried to look into the code but could not find anything useful.

 

I wonder why so few people mentioned this issue..I really would like to have this module being used on my site. Any help on this issue will be greatly appreciated....Many thanks in advance!!

 

Nevermind, I figured it out finally. need to increase the height of the calendarbox in the css file.

Link to comment
Share on other sites

  • 3 weeks later...

Anyone have any ideas?

 

We are having two other issues as well...

 

1) if you include a comma, like this ', it will publish with a "\" in front of it which does not allow you to delete

2) items that are created cannot be deleted

 

thanks in advance for your help.

Link to comment
Share on other sites

Has anyone figured out how to fix the Event Manager so that admins can delete events without having to go into phpmyadmin?

 

I need this fixed ASAP.. thanks in advance.

Edited by binaryweb
Link to comment
Share on other sites

Has anyone figured out how to fix the Event Manager so that admins can delete events without having to go into phpmyadmin?

 

I need this fixed ASAP.. thanks in advance.

 

I'm not having trouble deleting from the admin. I'm wondering if you have a syntax issue in the files you loaded to "admin" or maybe there's a mysql issue that's preventing the admin from removing the event from the record. I'm able to delete my events, but for some reason, each new event has a new id. So it skips over the id of the deleted event.

 

The problem that I'm having is when I click on the month heading in the calendar it displays December with no events in the events_calendar page. Not sure why it's doing this. The url looks correct....

Link to comment
Share on other sites

  • 4 weeks later...

Good day everyone,

 

I have only recently started with osCommerce and am still learning. I have installed the Events Calendar. It is all working nice and properly. Now I want to add a few new functions. I want to see a different cell in the Calendar when an event is planned on that date. I have ran threw the code a lot of times but I can't figure out how to do it. I already have the day that the cell has to turn to a different css style in a variable using the following code in calendar.php.

//	Query for selecting the day of the events
$test_query = mysql_query("select day(start_date)as day1 from `" . TABLE_EVENTS_CALENDAR
. "` WHERE MONTH(start_date) = '" . $month . "' AND YEAR(start_date) = '" . $year . "' ORDER BY start_date ");
while ($test_row = mysql_fetch_array($test_query)){
//	Plain text: Day(s) of the date.
$event_day = $test_row['day1'];
//	New css style: Day(s) of the date.
$even_blabla = "<label selectable='false' class='calenderEventShow'>".$test_row['day1']."</label>";
}

 

Is anybody able to help me get back on track?

 

Thanks in advance.

Edited by Menno.Ridder
Link to comment
Share on other sites

I'm able to delete my events, but for some reason, each new event has a new id. So it skips over the id of the deleted event.

Reason is that it doesn't delete the automaticly generated ID. At a auto-ingrement it just keeps on counting + when you generate a new one, regardless to deleted or edited ones.

 

Btw. Is anybody still reading this topic? Else someone should lock it up and I could open a new topic for my question...

Edited by Menno.Ridder
Link to comment
Share on other sites

  • 2 weeks later...

when i tried in local host..everything works so good...

but when I upload to my website..I get this messege in infobox..

 

 

Fatal error: Cannot instantiate non-existent class: calendar in /home/gooce05/public_html/calendar_content.php on line 29

 

anyone can help me please....because I'm very-very need with this great contribution..

Link to comment
Share on other sites

  • 2 weeks later...
I keep getting the Parse error: parse error, unexpected T_REQUIRE in /xxx/xxx/xxx/catalog/events_calendar.php on line 1 error that everyone keeps talking about, I have the newest RC and the only solution I have heard, it "tired an older package". After 5 hours, and several "older packages" I'm getting kind of frustrated! Can someone help me?

 

I've poured through my code to make sure I didn't forget to copy a ";" anywhere. Since its on every single file pertaining to do withthis mod, I'm assuming its the highest level file in the mod, which they all reference, any ideas?

 

Has anybody figured out why this error is happening and/or which older version to use? I'm getting the same error using 2.2RC1

 

Frontend:

Parse error: syntax error, unexpected T_VARIABLE in /home/xxx/public_html/catalog/includes/boxes/calendar.php on line 1

 

Admin:

Parse error: syntax error, unexpected T_REQUIRE in /home/xxx/public_html/catalog/admin/events_manager.php on line 1

 

Please help, I need this for a site I'm trying to complete ASAP. thx!

Link to comment
Share on other sites

  • 3 weeks later...

I do not know if anyone is still working on this, but I have spent the last 14 hours trying to get this to work. I have just about given up. If you look at mysite http://treasuresofthevine.net/shop/events_...&_year=2008 you will see the events calendar showing upon the far right hand side of the page. I cant for the life of me figure out whats going on with this or why its happening.

 

Any one please help me with this?

 

Thanks!

Link to comment
Share on other sites

I do not know if anyone is still working on this, but I have spent the last 14 hours trying to get this to work. I have just about given up. If you look at mysite http://treasuresofthevine.net/shop/events_...&_year=2008 you will see the events calendar showing upon the far right hand side of the page. I cant for the life of me figure out whats going on with this or why its happening.

 

Any one please help me with this?

 

Thanks!

 

I am still working on this and am clueless on even there to look. Anyone plz help me out?

Link to comment
Share on other sites

  • 1 month later...

Hi, I am a newbie and just need a bit of direction please.

 

I have installed everything up to the create database. This part:

Create DB table "events_calendar"

 

Can someone please tell me what file to add it to and where?

This is the code i need to add to create it

 

# --------------------------------------------------------

 

DROP TABLE IF EXISTS events_calendar;

CREATE TABLE events_calendar (

event_id int(3) NOT NULL auto_increment,

language_id int(11) NOT NULL default '1',

start_date date NOT NULL default '0000-00-00',

end_date varchar(20) default NULL,

title varchar(255) default NULL,

event_image varchar(64) default NULL,

link varchar(255) default NULL,

OSC_link varchar(255) default NULL,

description text,

date_added datetime NOT NULL default '0000-00-00 00:00:00',

PRIMARY KEY (event_id,language_id)

) TYPE=MyISAM;

 

 

# --------------------------------------------------------

 

Any help would be greatly appreciated.

Thanks Shell

Link to comment
Share on other sites

1) Go to your ISPs admin area for your site.

 

2) Click on the icon for Database administration or Mysql, then find the link for phpmyadmin, it might be hidden away at the bottom but not on all admin sites. If you can’t find this, please consult your ISP's help desk.

 

3) In some cases, you may have to choose which database your OSC tables are located on. If this is the case, please choose using the dropdown box.

 

4) Click on "SQL" on the navigation bar.

 

5) Enter/paste your SQL in the textbox provided or, if you have a file containing the sql commands, click on Import and follow the on screen prompts.

 

6) For both methods click "Go"..

 

7) If all goes well, your SQL query will run successfully

 

For another explanation see:-

 

http://www.oscommerce.com/forums/index.php?sho...dmin+mysql+code

 

Or for a contribution to allow you to run SQL Script from Admin

 

http://www.oscommerce.com/community/contributions,4567

 

 

 

 

On another note

 

If anyone knows of an event booking system rather than just a display I would be interested.

 

Cheers!

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

  • 4 weeks later...
Has anybody figured out why this error is happening and/or which older version to use? I'm getting the same error using 2.2RC1

 

Frontend:

Parse error: syntax error, unexpected T_VARIABLE in /home/xxx/public_html/catalog/includes/boxes/calendar.php on line 1

 

Admin:

Parse error: syntax error, unexpected T_REQUIRE in /home/xxx/public_html/catalog/admin/events_manager.php on line 1

 

Please help, I need this for a site I'm trying to complete ASAP. thx!

 

For anyone installing the most current version of this contribution, there are several files that don't have carriage returns in the file. The code/CSS/etc. is all run together. That's what causes the parse error on line 1. Open up the files with FrontPage, Word, or something that will parse the file and then copy it up to your host.

 

I installed this contribution on RC2 and it works fine. I found one minor bug, if anyone has any thoughts. When looking at the dropdown for events, it doesn't include the event if it starts on today's date. I looked at the select, but didn't see the problem offhand.

 

If you want to look at the code see:

 

http://injewelrynow.com/events_calendar.php?view=all_events

 

Or here is the original PHP code:

 

<?php
/*
 $Id: events_calendar v2.00 2003/06/16 18:09:20 ip chilipepper.it Exp $
 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]
 Copyright © 2003 osCommerce
 Released under the GNU General Public License
*/

require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_EVENTS_CALENDAR);

define('SECTION', NAVBAR_TITLE);  

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_EVENTS_CALENDAR, '', 'NONSSL'));

//add breadcrumb for requested 
if(isset($single_event) || $HTTP_GET_VARS['select_event'])
{
   $navbarEventTitle = NAVBAR_EVENT_TITLE_DETAIL;
}
else if($HTTP_GET_VARS['year_view'] == 1)
{
   $navbarEventTitle = NAVBAR_EVENT_TITLE_YEAR;
}
else if($HTTP_GET_VARS['_day'])
{
   $navbarEventTitle = NAVBAR_EVENT_TITLE_DAY;
}
else if($HTTP_GET_VARS['view'] == 'all_events')
{
   $navbarEventTitle = NAVBAR_EVENT_TITLE_ALL;
}
else
{
   $navbarEventTitle = NAVBAR_EVENT_TITLE_MONTH;
}
$breadcrumb->add($navbarEventTitle, $HTTP_SERVER_VARS["REQUEST_URI"], '', 'NONSSL');

$i =1;
$cal = new Calendar;
$cal->setStartDay(FIRST_DAY_OF_WEEK);
$this_month = date('m');
$this_year = date('Y');

if ($HTTP_GET_VARS['_month']) 
{
   $month = $_month;
   $year = $_year;
   $a = $cal->adjustDate($month, $year);
   $month_ = $a[0];
   $year_= $a[1];
}
else
{
   $year = $this_year;
   $month = $this_month;
   $yeventear_= $year;
   $month_= $month;
   $year_= $year;
}
if($HTTP_GET_VARS['_day'])
{
   $ev_query = tep_db_query("select event_id from " . TABLE_EVENTS_CALENDAR 
       . " where DAYOFMONTH(start_date)= '" . $_day . "' and MONTH(start_date) = '" . $_month 
       . "' and YEAR(start_date) = '" . $_year . "' AND language_id = '" . $languages_id . "'");
   if(tep_db_num_rows($ev_query) == 1)
   {
       $ev = tep_db_fetch_array($ev_query);
       $single_event = true;
       $select_event = $ev['event_id'];
   }
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML <?php echo HTML_PARAMS; ?>>
<HEAD>
   <TITLE><?php echo TITLE . ' - ' . NAVBAR_TITLE; ?></TITLE>
   <META http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 
<META name="KeyWords" content="">
<META name="Description" content="">
   <BASE href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
   <LINK rel="stylesheet" type="text/css" href="stylesheet.css">
   <LINK rel="shortcut icon" href="favicon.ico" >
   <LINK rel="icon" href="favicon.ico" >    
</HEAD>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?> " valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?> " cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </td></tr></table>
<!-- body_text //-->
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
        <!-- Take out the extra header and put in a link to all events -->
         <tr>
            <td align=center><a href="http://www.injewelrynow.com/events_calendar.php?view=all_events"><font size=2 face=verdana>CLICK HERE TO SEE ALL EVENTS</font></td>
               </tr> 
                <!-- LJ add missing row -->
                      <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
                      </tr>
                <!-- add calendar LJ -->
                  <tr><td>
                  <?php require(DIR_WS_BOXES . 'calendar.php'); ?>
                  </td></tr>
               <!-- LJ add a blank line -->
                      <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
                      </tr>
               <tr>
                   <td  class="main" nowrap align=center>
                   <?php
                       echo tep_draw_form('goto_event', FILENAME_EVENTS_CALENDAR, '', 'get');
                       $ev_query = tep_db_query("select *, DAYOFMONTH(start_date) AS day, MONTH(start_date) AS month, YEAR(start_date) AS year"
                           . " from " . TABLE_EVENTS_CALENDAR 
                           . " where start_date >= '" . date('Y-m-d H:i:s') . "' and language_id = '" . $languages_id . "'"
                           . " order by start_date");
                       if(tep_db_num_rows($ev_query) > 0)
                       {
                           $event_array[]  = array('id' => '', 'text' => TEXT_SELECT_EVENT);
                           while ($q_events = tep_db_fetch_array($ev_query))
                           {
                               $year = $q_events['year'];
                               $month = $q_events['month'];
                               $day = $q_events['day'];
                               $event_array[] = array('id' => $q_events['event_id'], 'text' => $cal->monthNames[$month - 1] . ' ' . $day . ' -> ' . $q_events['title']);
                           }
                           echo tep_draw_pull_down_menu('select_event', $event_array, NULL, 'onChange="(this.value != \'\') ? this.form.submit() : \'\' " ;', $required = false);
                       }
                   ?>
                   </form>
                   </td>
               </tr>
           </table>
       </td>
   </tr>
   <tr>
       <td>
<?php
$dateDisplayFormat = "F d, Y";

if(isset($single_event) || $HTTP_GET_VARS['select_event'])
{   //Show Details of a single event.
   $events_query = tep_db_query("select *, DAYOFMONTH(start_date) AS event"
       . " from " . TABLE_EVENTS_CALENDAR 
       . " where event_id = '" . $select_event . "' and language_id = '" . $languages_id . "'");

   while($events = tep_db_fetch_array($events_query))
   {
       list($year, $month, $day) = split ('[/.-]', $events['start_date']);
       $date_start = date($dateDisplayFormat, mktime(0,0,0,$month,$day,$year));
?>
       <?php
       if($events['end_date'])
       {
           list($year_end, $month_end, $day_end) = split ('[/.-]', $events['end_date']);
           $date_end = date($dateDisplayFormat, mktime(0,0,0,$month_end,$day_end,$year_end));
       }
       $event_array = array('id' => $events['event_id'],
                            'title' => $events['title'],
                            'image' => $events['event_image'],
                            'description' => $events['description'],
                            'first_day' => $date_start,
                            'last_day' => $date_end,
                            'OSC_link' => $events['OSC_link'],
                            'link' => $events['link']);
       $clsp = 2;
?>
<!-- LJ add a blank line and move the header down -->
       <?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?>


           <table width="100%" cellspacing="0" cellpadding="4" class="event_description">
             <tr><td>
             <?php echo $events['title']?>
             </td></tr>
               <tr>
                   <td class="event_header_dates" nowrap>
                       <?php 
                           if($event_array['last_day'])
                           {
                               echo '<b>' . TEXT_EVENT_START_DATE . '</b>';
                           }
                       ?>
                         <?php echo $event_array['first_day'];?>
                   </td>
<?php
       if($event_array['last_day'])
       {
?>
                   <td class="event_header_dates" nowrap>
                       <b><?php echo TEXT_EVENT_END_DATE;?></b>  <?php echo $event_array['last_day'];?>
                   </td>
<?php
           $clsp++;
       }
?>
                   <td width="100%" class="event" nowrap> </td>
               </tr>
               <tr>
                   <td colspan="<?php echo $clsp;?>" class="event_description">
                      <?php
       if ($event_array['image'])
       {
?>
                       <table border="0" cellspacing="0" cellpadding="0" align="right">
                           <tr>
                               <td class="main">
                                   <?php echo tep_image(DIR_WS_IMAGES .'events_images/' . $event_array['image'], $event_array['title'], '', '', 'align="right" hspace="5" vspace="5"');?>
                               </td>
                           </tr>
                       </table>
<?php
       }
       echo stripslashes($event_array['description']);
?>
                   </td>
<?php
       if($event_array['OSC_link'])
       {
?>
               </tr>
               <tr>
                   <td colspan="<?php echo $clsp;?>"  align="left" class="event_header">
                       <?php echo TEXT_EVENT_OSC_LINK;?>  
                       <a href="<?php echo $event_array['OSC_link'];?>">
                           <?php echo $event_array['OSC_link'];?>
                       </a>
                   </td>
<?php
       }
       if($event_array['link'])
       {
?>
               </tr>
               <tr>
                   <td colspan="<?php echo $clsp;?>" align="left" class="event_header">
                       <?php echo TEXT_EVENT_LINK;?>  
                       <a href="http://<?php echo $event_array['link'];?>" target="_blank">
                           <?php echo $event_array['link'];?>
                       </a>
                   </td>
<?php
       }
?>
               </tr>
           </table>
<?php
   }

   //Show all other events for the same day or during the duration of the selected event.
   $beginDay = $year . '-' . $month . '-' . $day;
   $endDay = $year_end . '-' . $month_end . '-' . $day_end;
   $other_events_query = tep_db_query("select *, DAYOFMONTH(start_date) AS event from ". TABLE_EVENTS_CALENDAR 
       . " where ( (start_date BETWEEN '" . $beginDay . "' and '". $endDay . "')"
       . "			or (end_date BETWEEN '" . $beginDay . "' and '" . $endDay . "')" 
       . "         or ( (start_date <= '" . $beginDay . "' and start_date <= '" . $endDay . "')" 
       . "             and (end_date >= '" . $beginDay . "' and end_date >= '" . $endDay . "') ) )" 
       . " and language_id = '" . $languages_id . "' and event_id != '" . $select_event 
       . "' order by start_date");
   if (tep_db_num_rows($other_events_query) > 0) 
   {
?>
            <h3><?php echo TEXT_OTHER_EVENTS;?></h3>
           <table border="0" width="100%" cellspacing="0" cellpadding="2" class="event_header">

<?php
       while ($other_events = tep_db_fetch_array($other_events_query))
       {
           $event_array = array('id' => $other_events['event_id'],
                                'event' => $other_events['event'],
                                'title' => $other_events['title']);
?>
               <tr>
                   <td align="center" width="24" class="event_header" nowrap>
                       <b><?php echo $i; ?></b>
                   </td>
                   <td width="100%" class="event">
                       <a href="<?php echo FILENAME_EVENTS_CALENDAR;?>?select_event=<?php echo $event_array['id'];?>">
                           <?php echo $event_array['title'];?>
                       </a>
                   </td>
               </tr>
<?php
           $i++;
       }
?>
           </table>
<?php
   }
}
elseif($HTTP_GET_VARS['year_view'] == 1)
{   //Show the full year view.
?>
           <table border="0" width="100%" cellspacing="0" cellpadding="0">
               <tr>
                   <td><?php echo $cal->getYearView($year_); ?></td>
               </tr>
           </table>
<?php
}
elseif($HTTP_GET_VARS['_day'])
{   //Show all Events for the specified date.
   $events_query_raw = "select *, DAYOFMONTH(start_date) AS event from " . TABLE_EVENTS_CALENDAR
   	. " where '" . $_year . "-" . $_month . "-" . $_day . "' BETWEEN start_date and end_date" 
       . " and language_id = '" . $languages_id . "' order by start_date";

   $listingTitle = date($dateDisplayFormat, mktime(0, 0, 0, $_month, $_day, $_year));
   $displayPagingSuffix = $listingTitle;
   require(DIR_WS_MODULES . 'events_calendar_listing.php');
}
else if($HTTP_GET_VARS['view'] == 'all_events')
{   //Show all Events from current date.
   $events_query_raw = "select *, DAYOFMONTH(start_date) AS event from " . TABLE_EVENTS_CALENDAR 
       . " where (start_date >= '" . date('Y-m-d H:i:s') . "' or end_date >= '" . date('Y-m-d H:i:s') . "')"
       . " and language_id = '" . $languages_id . "' order by start_date";

   $listingTitle = 'All Events';
   $displayPagingSuffix = NULL;
   require(DIR_WS_MODULES . 'events_calendar_listing.php');
}
else
{   //Show All Events for the current or specified month/year
   $events_query_raw = "select *, DAYOFMONTH(start_date) AS event from " . TABLE_EVENTS_CALENDAR 
       . " where ((MONTH(start_date) = '" . $month_ . "' and YEAR(start_date) = '" . $year_ . "')"
       . "        or (MONTH(end_date) = '" . $month_ . "' and YEAR(end_date) = '" . $year_ . "'))"
       . " and language_id = '" . $languages_id . "'  order by start_date";

   $months = $cal->monthNames[$month_ - 1];

   $listingTitle = $months . ' ' . $year_;
   $displayPagingSuffix = $listingTitle;
   require(DIR_WS_MODULES . 'events_calendar_listing.php');
}
?>
       </td>
   </tr>
</table>
</td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</BODY>
</HTML>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Thanks in advance. :rolleyes:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...