<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: Build a Calendar Using PHP, XHTML, and&#160;CSS</title> <atom:link href="http://davidwalsh.name/php-calendar/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/php-calendar</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 09 Feb 2012 02:40:12 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>By: maim</title><link>http://davidwalsh.name/php-calendar/comment-page-1#comment-28725</link> <dc:creator>maim</dc:creator> <pubDate>Sun, 29 Jan 2012 22:10:16 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3083#comment-28725</guid> <description>hey guys,
dont know if someone already posted such modifications in order to start with monday, however, here is another solution:adapt these lines:
$headings = array(&#039;Mo&#039;,&#039;Di&#039;,&#039;Mi&#039;,&#039;Do&#039;,&#039;Fr&#039;,&#039;Sa&#039;,&#039;So&#039;); //reorder labels, starting with monday
$running_day = date(&#039;N&#039;,mktime(0,0,0,$month,1,$year))-1; //date(&#039;N&#039;) returns 1-7, starting with monday</description> <content:encoded><![CDATA[<p>hey guys,<br
/> dont know if someone already posted such modifications in order to start with monday, however, here is another solution:</p><p>adapt these lines:<br
/> $headings = array(&#8216;Mo&#8217;,'Di&#8217;,'Mi&#8217;,'Do&#8217;,'Fr&#8217;,'Sa&#8217;,'So&#8217;); //reorder labels, starting with monday<br
/> $running_day = date(&#8216;N&#8217;,mktime(0,0,0,$month,1,$year))-1; //date(&#8216;N&#8217;) returns 1-7, starting with monday</p> ]]></content:encoded> </item> <item><title>By: David</title><link>http://davidwalsh.name/php-calendar/comment-page-1#comment-28390</link> <dc:creator>David</dc:creator> <pubDate>Wed, 04 Jan 2012 04:41:16 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3083#comment-28390</guid> <description>First off... EXCELLENT calendar!!
I am trying to insert events into the calendar but for some reason the query never executes.  I am using mysqli_query() and it just dies.
&lt;code&gt;
/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !!  IF MATCHES FOUND, PRINT THEM !! **/$query = &quot;SELECT * FROM u_dailystats WHERE username = &#039;&quot; . $_SESSION[&#039;username&#039;] . &quot;&#039;&quot; . &quot;AND statdate = &#039;$todaydate&#039;&quot;;
$results = mysqli_query($dbc, $query) or die(&quot;Error 1: &quot;.mysqli_error($dbc));
if (mysqli_num_rows($results) &gt; &#039;0&#039;) {
while($row = mysql_fetch_array($results)){
extract($row);
&lt;/code&gt;
Only result I get is &quot;Error 1:&quot;
Any ideas why this is?</description> <content:encoded><![CDATA[<p>First off&#8230; EXCELLENT calendar!!<br
/> I am trying to insert events into the calendar but for some reason the query never executes.  I am using mysqli_query() and it just dies.<br
/> <code><br
/> /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !!  IF MATCHES FOUND, PRINT THEM !! **/</p><p> $query = "SELECT * FROM u_dailystats WHERE username = '" . $_SESSION['username'] . "'" . "AND statdate = '$todaydate'";<br
/> $results = mysqli_query($dbc, $query) or die("Error 1: ".mysqli_error($dbc));<br
/> if (mysqli_num_rows($results) &gt; '0') {<br
/> while($row = mysql_fetch_array($results)){<br
/> extract($row);<br
/> </code><br
/> Only result I get is &#8220;Error 1:&#8221;<br
/> Any ideas why this is?</p> ]]></content:encoded> </item> <item><title>By: mohamed</title><link>http://davidwalsh.name/php-calendar/comment-page-1#comment-28008</link> <dc:creator>mohamed</dc:creator> <pubDate>Wed, 21 Dec 2011 19:07:47 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3083#comment-28008</guid> <description>i hope any one answer to me</description> <content:encoded><![CDATA[<p>i hope any one answer to me</p> ]]></content:encoded> </item> <item><title>By: mohamed</title><link>http://davidwalsh.name/php-calendar/comment-page-1#comment-28007</link> <dc:creator>mohamed</dc:creator> <pubDate>Wed, 21 Dec 2011 19:02:01 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3083#comment-28007</guid> <description>i hope to know how i use it in my webpage</description> <content:encoded><![CDATA[<p>i hope to know how i use it in my webpage</p> ]]></content:encoded> </item> <item><title>By: phlex</title><link>http://davidwalsh.name/php-calendar/comment-page-1#comment-27392</link> <dc:creator>phlex</dc:creator> <pubDate>Sun, 30 Oct 2011 18:47:29 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3083#comment-27392</guid> <description>Am happy i found this, thanks for this piece. but how can i reduce calendar to fit into a 266px section on my page. thanks</description> <content:encoded><![CDATA[<p>Am happy i found this, thanks for this piece. but how can i reduce calendar to fit into a 266px section on my page. thanks</p> ]]></content:encoded> </item> <item><title>By: Jamie</title><link>http://davidwalsh.name/php-calendar/comment-page-1#comment-27370</link> <dc:creator>Jamie</dc:creator> <pubDate>Thu, 27 Oct 2011 19:42:03 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3083#comment-27370</guid> <description>How would I implement a jquery dialog for specific events I seriously cannot figure it out!! Along with a next/previous link for each month ah!</description> <content:encoded><![CDATA[<p>How would I implement a jquery dialog for specific events I seriously cannot figure it out!! Along with a next/previous link for each month ah!</p> ]]></content:encoded> </item> <item><title>By: SK</title><link>http://davidwalsh.name/php-calendar/comment-page-1#comment-27168</link> <dc:creator>SK</dc:creator> <pubDate>Fri, 07 Oct 2011 14:34:20 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3083#comment-27168</guid> <description>Thanx a lot for this useful and handy script!!!</description> <content:encoded><![CDATA[<p>Thanx a lot for this useful and handy script!!!</p> ]]></content:encoded> </item> <item><title>By: Joseph</title><link>http://davidwalsh.name/php-calendar/comment-page-1#comment-26957</link> <dc:creator>Joseph</dc:creator> <pubDate>Thu, 22 Sep 2011 17:53:26 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3083#comment-26957</guid> <description>none of the highlight current day code works on here i tried every code and double check it none works can anyone help me out here&lt;code&gt;
&lt;?php
/* draws a calendar */
function draw_calendar($month,$year){/* draw table */
$calendar = &#039;&#039;;/* table headings */
$headings = array(&#039;Sunday&#039;,&#039;Monday&#039;,&#039;Tuesday&#039;,&#039;Wednesday&#039;,&#039;Thursday&#039;,&#039;Friday&#039;,&#039;Saturday&#039;);
$calendar.= &#039;&#039;.implode(&#039;&#039;,$headings).&#039;&#039;;/* days and weeks vars now ... */
$running_day = date(&#039;w&#039;,mktime(0,0,0,$month,1,$year));
$days_in_month = date(&#039;t&#039;,mktime(0,0,0,$month,1,$year));
$days_in_this_week = 1;
$day_counter = 0;
$dates_array = array();/* row for week one */
$calendar.= &#039;&#039;;/* print &quot;blank&quot; days until the first of the current week */
for($x = 0; $x &lt; $running_day; $x++):
$calendar.= &#039;&#160;&#039;;
$days_in_this_week++;
endfor;
// check today day &amp; the current month
if ($list_day == date(&#039;j&#039;) &amp;&amp; $month == date(&#039;m&#039;)) {
$calendar.= &#039;.$list_day.&#039;;
} else {
$calendar.= &#039;$list_day&#039;;
}/* keep going with days.... */
for($list_day = 1; $list_day &lt;= $days_in_month; $list_day++):
$calendar.= &#039;&#039;;
/* add in the day number */
$calendar.= &#039;&#039;.$list_day.&#039;&#039;;/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !!  IF MATCHES FOUND, PRINT THEM !! **/
$calendar.= str_repeat(&#039;&#160;&#039;,2);
$calendar.= &#039;&#039;;
if($running_day == 6):
$calendar.= &#039;&#039;;
if(($day_counter+1) != $days_in_month):
$calendar.= &#039;&#039;;
endif;
$running_day = -1;
$days_in_this_week = 0;
endif;
$days_in_this_week++; $running_day++; $day_counter++;
endfor;/* finish the rest of the days in the week */
if($days_in_this_week &lt; 8):
for($x = 1; $x &lt;= (8 - $days_in_this_week); $x++):
$calendar.= &#039;&#160;&#039;;
endfor;
endif;/* final row */
$calendar.= &#039;&#039;;/* end the table */
$calendar.= &#039;&#039;;
/* all done, return result */
return $calendar;
}/* Current month and year */
$year = date (&#039;Y&#039;); $month_title = date (&#039;F&#039;);
$month_display = date (&#039;n&#039;);
/* sample usages */
echo &#039;&#039;.$month_title.&#039;&#160;&#039;.$year.&#039;&#039;;
echo draw_calendar($month_display,$year);
?&gt;
&lt;/code&gt;</description> <content:encoded><![CDATA[<p>none of the highlight current day code works on here i tried every code and double check it none works can anyone help me out here</p><p><code><br
/> &lt;?php<br
/> /* draws a calendar */<br
/> function draw_calendar($month,$year){</p><p> /* draw table */<br
/> $calendar = &#039;';</p><p> /* table headings */<br
/> $headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');<br
/> $calendar.= ''.implode('',$headings).'';</p><p> /* days and weeks vars now ... */<br
/> $running_day = date('w',mktime(0,0,0,$month,1,$year));<br
/> $days_in_month = date('t',mktime(0,0,0,$month,1,$year));<br
/> $days_in_this_week = 1;<br
/> $day_counter = 0;<br
/> $dates_array = array();</p><p> /* row for week one */<br
/> $calendar.= '';</p><p> /* print "blank" days until the first of the current week */<br
/> for($x = 0; $x &lt; $running_day; $x++):<br
/> $calendar.= &#039;&nbsp;';<br
/> $days_in_this_week++;<br
/> endfor;</p><p> // check today day &amp; the current month<br
/> if ($list_day == date('j') &amp;&amp; $month == date('m')) {<br
/> $calendar.= '.$list_day.';<br
/> } else {<br
/> $calendar.= '$list_day';<br
/> }</p><p> /* keep going with days.... */<br
/> for($list_day = 1; $list_day &lt;= $days_in_month; $list_day++):<br
/> $calendar.= &#039;';</p><p> /* add in the day number */<br
/> $calendar.= ''.$list_day.'';</p><p> /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !!  IF MATCHES FOUND, PRINT THEM !! **/<br
/> $calendar.= str_repeat('&nbsp;',2);</p><p> $calendar.= '';<br
/> if($running_day == 6):<br
/> $calendar.= '';<br
/> if(($day_counter+1) != $days_in_month):<br
/> $calendar.= '';<br
/> endif;<br
/> $running_day = -1;<br
/> $days_in_this_week = 0;<br
/> endif;<br
/> $days_in_this_week++; $running_day++; $day_counter++;<br
/> endfor;</p><p> /* finish the rest of the days in the week */<br
/> if($days_in_this_week &lt; 8):<br
/> for($x = 1; $x &lt;= (8 - $days_in_this_week); $x++):<br
/> $calendar.= &#039;&nbsp;';<br
/> endfor;<br
/> endif;</p><p> /* final row */<br
/> $calendar.= '';</p><p> /* end the table */<br
/> $calendar.= '';</p><p> /* all done, return result */<br
/> return $calendar;<br
/> }</p><p> /* Current month and year */<br
/> $year = date ('Y'); $month_title = date ('F');<br
/> $month_display = date ('n');</p><p> /* sample usages */<br
/> echo ''.$month_title.'&nbsp;'.$year.'';<br
/> echo draw_calendar($month_display,$year);<br
/> ?&gt;<br
/> </code></p> ]]></content:encoded> </item> <item><title>By: dmirsch</title><link>http://davidwalsh.name/php-calendar/comment-page-1#comment-26898</link> <dc:creator>dmirsch</dc:creator> <pubDate>Fri, 16 Sep 2011 00:45:13 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3083#comment-26898</guid> <description>Trying to use your calendar which I like! However I&#039;m having some issues:1. I need to have a &lt;&gt; link, but cannot get the coding supplied by someone else above to work.2. I cannot get my data to display as my information is in three separate tables of one database: Event, Performance, Venue --&gt; where Event contains the EventTitle, Performance contains the startDateTime and a VenueCode, and Venue contains the VenueName for the VenueCode. I can have a run of the EventTitle over multiple days/times in varying venues. (For example, Peter Case is playing on Friday at the Atwood Concert Hall in Anchorage, and also on Saturday at Vagabond Blues in Palmer.) So my query becomes very complicated. In all the examples above, the thought is that all the information is retained in one table...not my case.Can you help me out?</description> <content:encoded><![CDATA[<p>Trying to use your calendar which I like! However I&#8217;m having some issues:</p><p>1. I need to have a &lt;&gt; link, but cannot get the coding supplied by someone else above to work.</p><p>2. I cannot get my data to display as my information is in three separate tables of one database: Event, Performance, Venue &#8211;&gt; where Event contains the EventTitle, Performance contains the startDateTime and a VenueCode, and Venue contains the VenueName for the VenueCode. I can have a run of the EventTitle over multiple days/times in varying venues. (For example, Peter Case is playing on Friday at the Atwood Concert Hall in Anchorage, and also on Saturday at Vagabond Blues in Palmer.) So my query becomes very complicated. In all the examples above, the thought is that all the information is retained in one table&#8230;not my case.</p><p>Can you help me out?</p> ]]></content:encoded> </item> <item><title>By: Andi Prianto</title><link>http://davidwalsh.name/php-calendar/comment-page-1#comment-26883</link> <dc:creator>Andi Prianto</dc:creator> <pubDate>Wed, 14 Sep 2011 07:08:22 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3083#comment-26883</guid> <description>&lt;code&gt;
/* add in the day number */
$calendar.= &#039;&lt;a href=&quot;#&quot; rel=&quot;nofollow&quot;&gt;&#039;.$list_day.&#039;&lt;/a&gt;&#039;;
&lt;/code&gt;</description> <content:encoded><![CDATA[<p><code><br
/> /* add in the day number */<br
/> $calendar.= '<a
href="#" rel="nofollow">'.$list_day.'</a>';<br
/> </code></p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching using disk: basic
Object Caching 866/872 objects using disk: basic

Served from: davidwalsh.name @ 2012-02-09 00:10:57 -->
