BLAG Ramblings of a crazy old fool

25Nov/070

Christmas List

Click here for my 2007 Christmas List

So here is my Christmas present to you, intarwebs: The source! This is PHP/MySQL and can be easily included in any PHP page. Get your list started early (late?) this year with new code!

<?php

  //
  // christmaslist.php
  // Chistmas List script for weblog
  //
  // Author: Joshua Worden, IWM Entertainment
  // Released Nov. 2007 under GPL
  //
  // Usage: Designed to be included on a page.

  /*
     --
     -- Table structure for table `christmaslist`
     -- 

      CREATE TABLE `christmaslist` (
       `id` int(11) NOT NULL auto_increment,
       `image` text NOT NULL,
       `title` text NOT NULL,
       `description` text NOT NULL,
       `price` float NOT NULL default '0',
       `date` datetime NOT NULL default '0000-00-00 00:00:00',
    PRIMARY KEY  (`id`),
    FULLTEXT KEY `description` (`description`)
    ) TYPE=MyISAM AUTO_INCREMENT=5 ;

    --
    -- End table structure
    --
  */

  // Definitions 

  $_site['sql-host']      = ""; // MySQL Host (localhost)
  $_site['sql-user']      = ""; // MySQL Username
  $_site['sql-pass']      = ""; // MySQL Password
  $_site['sql-data']      = ""; // MySQL Database

  // Functions

  function DisplayItems($B_SORTED, $T_SORTMODE) {
    if($B_SORTED) { $Q_SQL1 = mysql_query("SELECT * FROM christmaslist ORDER BY ".$T_SORTMODE." ASC;");}
    else          { $Q_SQL1 = mysql_query("SELECT * FROM christmaslist ORDER BY date ASC;"); }

    echo "<div style=\"width:100%; text-align:center; margin:0 auto;\">\r\n";
    echo "<div style=\"width:100%; clear:both;\">\r\n";
    echo "<div style=\"width:20%;float:left;position:relative;\"><a href=\"?sort=image\"><b>Category</b></a></div>";  // [Image]
    echo "<div style=\"width:20%;float:left;position:relative;\"><a href=\"?sort=title\"><b>Title</b></a></div>";     // Title
    echo "<div style=\"width:20%;float:left;position:relative;\"><b>Description</b></div>";                           // [Description]
    echo "<div style=\"width:20%;float:left;position:relative;\"><a href=\"?sort=price\"><b>Price</b></a></div>";     // Price
    echo "<div style=\"width:20%;float:left;position:relative;\"><a href=\"?sort=date\"><b>Date Added</b></a></div>"; // Date Added
    echo "</div>";
    while($T_SQLRESULT=mysql_fetch_array($Q_SQL1)) {
      echo "<div style=\"width:100%; clear:both;\">\r\n";
      echo "<div style=\"width:20%;height:100px;float:left;position:relative;\"><img src=/images/thumbs/".$T_SQLRESULT['image']." /></div>";
      echo "<div style=\"width:20%;float:left;position:relative;\">".$T_SQLRESULT['title']."</div>";
      echo "<div style=\"width:20%;float:left;position:relative;\">".$T_SQLRESULT['description']."</div>";
      echo "<div style=\"width:20%;float:left;position:relative;\">$".$T_SQLRESULT['price']."</div>";
      echo "<div style=\"width:20%;float:left;position:relative;\">".$T_SQLRESULT['date']."</div>";
      echo "</div>";
      }
    echo "<div style=\"width:100%; clear:both;\"> </div>\r\n";
    echo "</div>\r\n";
    }

  function Error($T_ERROR) {
    // Show error
    echo "<div style=\"width:400px; height:150px; clear:both; background:#FF0000;\">\r\n";
    echo "\t<h4><font color=#FFFFFF>MySQL Error:</font></h4>\r\n" . $T_ERROR . "\r\n";
    echo "</div>\r\n";
    die;
    }

  // Connect to MySQL

  $B_SQLCONN = @mysql_connect($_site['sql-host'],$_site['sql-user'],$_site['sql-pass']);
  $B_SQLDATA = @mysql_select_db($_site['sql-data']);
  if(!$B_SQLCONN || !$B_SQLDATA){Error(mysql_error());}

  // Check for sort mode

  if(isset($_GET['sort'])) { DisplayItems(TRUE, $_GET['sort']); }
  else { DisplayItems(FALSE,"date"); }

?>
22Nov/070

Happy Thanksgiving

I really don't know where the hell this came from. I was thinking to myself [Man, do I love turkey.] I had a 1.5lb turkey sandwich today (long story). Kinda morbid eating a bith bird in celebration of some shit. Ah, a dracula font. Hmm...

If they made a holiday where we could eat the Bith, that would be the one and only time I would ever cosplay.

17Mar/050

St. Patrick’s Day

Happy Saint Patty's day everyone! @_@. server issues. <3 Katie.

14Feb/050

February 14, 2005: 12:56 AM

Happy Valentine's Day!

This is my official Valentine's Day post.

Well, it's that time of year again. Time for candy, flowers, professions of undying love, etc. Fun fun. At least for the girls. :-P

Being the in the mood for it, and bored at 12:30 this morning, I decided to scour the Internet for images relating to V-day. And below are the best results:

And there you have it, the best images of the season. :-P . A happy Valentine's day to all, and especially to Katie. You make life interesting.

Well, happy Valentine's Day, everyone! Katie and Dan and I had a wonderful dinner at: Taco Bell. :P Awesome. And i finished that Cat5 bracelet, with some help from Katie. (Ok, a lot.) I may post some pics of it sometime. or make a new one. something like that.

I FOUND THE SONG THAT HAS BEEN IN MY HEAD FOR 3 WEEKS NOW.
Eric Clapton - Leila
Awesome song. Go buy it. $1/song, almost anywhere you look.

<3 Katie!

13Jan/050

January 13, 2005: 10:30 PM

playing: Opera Mix from te 5th Element Soundtrack

OMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMG

Half day tomorrow. In other news, on to disc 7 of the OC, I finished the bash.org modapp, and have yet to start on my physics project. Although i will admit that final was impossible. Utterly impossible. 50 minutes for 50 kinematics problems. Ugh.

Now, on to talking to freinds, and music. And myabe some programming.

For any of you who haven't heard, Chris Morrison passed away this morning, the funeral services have not been planned yet. This has been and will be a hard time for the Morrison family, and I know they aren't the only ones touched by Chris's passing. Chris's death, while not unexpected, is still a shock to us all. It's times like these we all need to stick together, not fall further apart.

kind of a dour ending for the holidays. <3 Katie.

1Jan/050

Happy New Year!

Well, another year has come and gone. So far as I can tell, we're no closer to mars, we dont have flying cars, and pizza is still expensive as hell. But hey, you can't have everything. :P

It's been quite an interesting year for me. Katie and I started going out on August 2nd of last year. It's been fun. And is. And will be. :D
I havent really gotten around to accomplishing much this year. I really need to. I think I'm failing English again, I really need to fix that. I launched v3 last night, but it isnt done, so it looks like shit. Which means I'll need to redesign and recode it. -_-
But anyway. This year should be interesting. I need to find a job; I'll be 18 in 7 months. :/ I applied everywhere, and yet i still cant get hired. This sucks. But oh well. I'm looking to take Business Admin/Network Admin at Indiana Business College. It looks like it wouldserve my purposes. I recommend it to the C-Level staff here at binaryfire; but whatever. After that, i may move to canada. Or Ireland. Get some co-location going for binaryfire. :P

Anyway, Happy New Year's everyone, Although I'm sure half of you are too hung over right now to read this. lol. Post comments here, or the official Forum post is here.

<3 Katie!