Site Re-Design and Launch Complete!

Well after months and months of work I finally launched a brand new Bushwick Dream site this afternoon.  Its been a long time coming since the site first started and I’m glad its finally over with so that I can go back into maintenance mode, but damn was it a fun run to make the new features work and iron out all the bugs.  For anybody interested you can visit the new and improved site here.

Ewww

So I’m sitting in Burger King waiting for them to start serving lunch and aimlessly surfing the internet when I see a man and woman come out of the same bathroom with conspiratorial smiles on their faces and walk right past an impromptu meeting of BK employees.  Sadly it took me a good 5 seconds to realize just what they had been up to, then a few seconds later the disgust caught up with me.  I’ve seen the inside of those bathrooms several times and I can’t imagine attempting to bang one out in there.  What the hell is wrong with people, are their private sex lives so damn boring that now they have to go out into public and screw in places where they really shouldn’t in order to get a cheap thrill?  Maybe instead of going into IT I should have gotten some kind of degree in the psy-whatever field and did counseling for these screwed up individuals who feel the need to shag in public bathrooms.

A calendar in less than 50 lines of php

It ain’t pretty by a long stretch, but the fact that it can fit into less than 50 lines of code and could be easily converted to a function for use in existing projects makes me a very happy camper, hopefully it will make it into the TheBushwickDream in the near future.

<?php
$month = $_GET['month'];
$days =  cal_days_in_month(CAL_GREGORIAN, $month,'2011'); // num of days in month

$ts = mktime(0,0,1,$month,1,2011);
$month_name = date('F',$ts);
$first_day = date('w',$ts); // numeric for the first day in the month

// 0 = Sunday, 6 = Saturday, layout is Sunday to Saturday

$d = 1;
print "<h3>$month_name</h3>";
print "first day is $first_day, $days in month!<br />";
print "Su, Mo, Tu, Wd, Th, Fr, Sa<br />";
print '<table width="50%" height="50%" cellpadding="50%" border="1">
<tr>
<td>Sunday</td>
<td>Monday</td>
<td>Tuesday</td>
<td>Wednesday</td>
<td>Thursday</td>
<td>Friday</td>
<td>Saturday</td>
</tr>';

for($week = 1; $week <= 5; $week++){
	print '<tr>';
	if($week == 1){
		for($day = 0; $day <= 6; $day++){
			if($day >= $first_day){
				print '<td>'.$d.'</td>';
				$d++;
			} else {
				print "<td> </td>";
			}
		}
	} else {
		for($day = 0; $day <= 6; $day++){
			if($d <= $days){
				print '<td>'.$d.'</td>';
				$d++;
			} else {
				print "<td> </td>";
			}
		}
	} print '</tr>';
}
print '</table>';
?>
Close Bitnami banner
Bitnami