Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #2440

tRe: show events in calendar

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.php
Subject tRe: show events in calendar
Date 2011-07-03 17:01 -0400
Organization A noiseless patient Spider
Message-ID <iuqlag$6h6$1@dont-email.me> (permalink)
References <18841eca-e34d-47e6-91ca-eec95b035948@fv14g2000vbb.googlegroups.com> <iuqbqv$8cp$1@dont-email.me> <26b60dd0-f238-4299-8e58-59058c596a67@t9g2000vbv.googlegroups.com>

Show all headers | View raw


On 7/3/2011 3:00 PM, Co wrote:
> On 3 jul, 20:19, Jerry Stuckle<jstuck...@attglobal.net>  wrote:
>> On 7/3/2011 11:13 AM, Co wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>> Hi All,
>>
>>> I got me some code to show a month calendar and I have a database with
>>> events.
>>> Now I want to show the events on the calendar. When there is an event
>>> on day X I want
>>> the number to be bold and on a mouse over display the details of the
>>> event.
>>
>>> Can anyone help me with this?
>>> here is my code:
>>> <<    I didn't put all the code which builds the calendar>>
>>
>>> // Build the heading portion of the calendar table
>>> echo "<table class=\"maintable\">\n".
>>>        "<tr class='headline'>\n".
>>>        "<td colspan=\"7\">\n".
>>>        "<table align=\"center\">\n".
>>>        "<tr class='headline'>\n".
>>>        "<td colspan=\"2\" width=\"75\" align=\"left\">$previous_link</td>
>>> \n".
>>>        "<td colspan=\"3\" width=\"150\" align=\"center\">$month_name
>>> $year</td>\n".
>>>        "<td colspan=\"2\" width=\"75\" align=\"right\">$next_link</td>
>>> \n".
>>>        "</tr>\n".
>>>        "</table>\n".
>>>        "</td>\n".
>>>        "<tr class='mainrow'>\n".
>>>        "<td>S</td><td>M</td><td>T</td><td>W</td><td>T</td><td>F</
>>> td><td>S</td>\n".
>>>        "</tr>\n";
>>
>>> // Now we break each key of the array
>>> // into a week and create a new table row for each
>>> // week with the days of that week in the table data
>>
>>> $i = 0;
>>> while (list(,  $week) = each($weeks))
>>> {
>>
>>>          echo "<tr class='mainrow'>\n";
>>>          while (list(,  $d) = each($week)){
>>
>>>            if($i<    $offset_count){
>>>                //$day_link = "<a href=\"".$_SERVER['PHP_SELF']."?
>>> date=".mktime(0, 0, 0, $month -1, $d, $year)."\">$d</a>";
>>>                echo "<td class=\"nonmonthdays\">$day_link</td>\n";
>>>            }
>>>            if(($i>= $offset_count)&&    ($i<    ($num_weeks * 7) - $outset))
>>> {
>>>               $datecount=mktime(0, 0, 0, $month -1, $d, $year);
>>>               $day_link = "<A href=\"javascript:popWin('editcalendar.php?
>>> ID=$datecount', 350,  400)\">$d</a>";
>>>              if($date == mktime(0, 0, 0, $month, $d, $year)){
>>>                  echo "<td><A href=\"javascript:popWin('editcalendar.php?
>>> ID=$datecount', 350,  400)\"><font color='red'><b>$d</b></font></a></
>>> td>\n";
>>>              } else {
>>>                  echo "<td class=\"days\">$day_link</td>\n";
>>>              }
>>>           } elseif(($outset>    0)) {
>>>               if(($i>= ($num_weeks * 7) - $outset)){
>>>                  $day_link = "";
>>>                  echo "<td class=\"nonmonthdays\">$day_link</td>\n";
>>>              }
>>>           }
>>>           $i++;
>>>         }
>>>         echo "</tr>\n";
>>> }
>>
>>> // Close out your table and that's it!
>>> echo "<tr class='headline'><td colspan='7' class='days'>&nbsp;</td></
>>> tr>";
>>> echo '</table>';
>>
>>> Regards
>>> Marco
>>
>> Luuk is right.  We help those who help themselves.  Copying code from
>> another site is fine - all of us do it.
>>
>> The difference is - we UNDERSTAND what the code does.  If you want to be
>> a web developer, you must learn HTML, a server-side language such as
>> PHP, SQL if you're going to use a database, and almost certainly a
>> client-side language such as javascript.
>>
>> Your questions here show you have made no attempt to even understand the
>> differences between technologies and people are rapidly losing interest
>> in trying to help you.  Your attitude is completing the alienation of
>> others.
>>
>> Good luck.  You're going to need it.
>>
>
>> Your questions here show you have made no attempt to even understand the
>> differences between technologies
>
> Ah another wise man who brags about helping people but in fact all he
> does is
> telling them they are no good and scaring them of. Why do you waste
> the energy
> in the first place. Just ignore the Q if you don't agree with it.
> Show a little more respect and people will respect you back.
>
> If I didn't make an attempt to understand then tell me why I got this
> thing
> working without any help.
>

Yup, I help people WHO TRY TO HELP THEMSELVES.  You have shown NO 
INDICATION OF DOING THIS.

And I don't need "respect" from people like you.  If you want someone to 
so your work for you, get out your checkbook.  This isn't a place to get 
free consulting or training.

>> Start learning to program in PHP,
>> get some knowledge about HTML,
>> and you can find out how this should be done easily....
>
> I just did.
>
> Marco

Obviously not - or you wouldn't be asking these questions here.  You 
don't even understand the differences between the technologies and which 
ones are appropriate for your questions.


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

show events in calendar Co <vonclausowitz@gmail.com> - 2011-07-03 08:13 -0700
  Re: show events in calendar Luuk <Luuk@invalid.lan> - 2011-07-03 18:40 +0200
    Re: show events in calendar Co <vonclausowitz@gmail.com> - 2011-07-03 09:52 -0700
      Re: show events in calendar Luuk <Luuk@invalid.lan> - 2011-07-03 19:24 +0200
        Re: show events in calendar Co <vonclausowitz@gmail.com> - 2011-07-03 10:32 -0700
          Re: show events in calendar Luuk <Luuk@invalid.lan> - 2011-07-03 19:43 +0200
            Re: show events in calendar Co <vonclausowitz@gmail.com> - 2011-07-03 10:56 -0700
  Re: show events in calendar Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-03 14:19 -0400
    Re: show events in calendar Co <vonclausowitz@gmail.com> - 2011-07-03 12:00 -0700
      Re: show events in calendar The Natural Philosopher <tnp@invalid.invalid> - 2011-07-03 21:22 +0100
        Re: show events in calendar Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-03 17:02 -0400
        Re: show events in calendar Co <vonclausowitz@gmail.com> - 2011-07-03 14:43 -0700
      tRe: show events in calendar Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-03 17:01 -0400

csiph-web