Jump to content

MinusMyThoughts

Members
  • Posts

    227
  • Joined

  • Last visited

Everything posted by MinusMyThoughts

  1. hey, guys!...i'm attempting to reduce my CSS to the bare minimum necessary to get it to display correctly. however, i've run into a weird issue that i can't seem to wrap my head around: some of my divs are simply NOT displaying in FF, or they're displaying out of order and out of size. however, they're working just fine in IE......so, if you please, have a look at my code and let me know if you can see which part of it opens the wormhole into a parallel universe where IE works......also, here's a link to the site: MY BROKEN CSS...if you open it with IE, it should look roughly the way i'm aiming for. but, in FF, it looks ridiculous...HTML File <html> <head> <title>Clean CSS Attempt</title> <link rel="stylesheet" href="MYCSSFILE.css" type="text/css" media="screen,projection" /> </head> <body> <!--// Master div. This should center the website and allow the header, body, and footer to align properly. //--> <div id="master"> <!--// Begin the header div. I'm notating ABOVE the tag in question for clarity's sake. //--> <div id="header"> <!--// End the header div. //--> </div> <!--// Begin the body div. //--> <div id="body"> <!--// Begin Column Holder. This div ensures that the three columns don't slip behind the Fans module. //--> <div id="columnHolder"> <!--// Begin Column One. //--> <div id="column"> <!--// Begin Nutrition Log. //--> <div id="3colSide"> THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. <!--// End Nutrition Log. //--> </div> <!--// Begin Training Log. //--> <div id="3colSide"> THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. <!--// End Nutrition Log. //--> </div> <!--// End Column One. //--> </div> <!--// Begin Column Two. //--> <div id="column"> <!--// Begin About Me. //--> <div id="3colMiddle"> THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. <!--// End About Me. //--> </div> <!--// End Column Two. //--> </div> <!--// Begin Column Three. //--> <div id="column"> <!--// Begin Blog. //--> <div id="3colSide"> THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. <!--// End Blog. //--> </div> <!--// Begin Member Stats. //--> <div id="3colSide"> THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. THIS IS TEST CONTENT. <!--// End Member Stats. //--> </div> <!--// End Column Three. //--> </div> <!--// End Columns. //--> </div> <!--// End the body div. //--> </div> <!--// Begin the footer div. //--> <div id="footer"> <!--// End the footer div. //--> </div> <!--// End the Master Div. //--> </div> </body></html> CSS File /* Basic Body Settings */body { background-color: #404040; margin:0px; padding:0px; border:0px; }div { margin:0px; padding:0px; }/* This div Centers the Pages */#master { background-color: #FFFFFF; position:absolute; width: 800px; height: auto; top:0px; left:50%; margin-left:-400px; }/* The Header. This is NOT the Menu. */#header { width: 800px; height: 275px; background-image:url('images/FITannica_02.gif'); position:relative; top:0px; clear:both; }/* The Body. Contains the Modules. */#body { width: 800px; height: auto; position:relative; background: #E6E6E6; }#columnHolder { width:100%; }#column { float:left; height: auto; left:0px; position: relative; }#3colSide { width: 210px; height: auto; border: 1px solid #404040; background-color: #FFFFFF; margin-left:10px; margin-bottom:10px; position: relative; }#3colMiddle { width: 340px; height: auto; border: 1px solid #404040; background-color: #FFFFFF; margin-left:10px; margin-bottom:10px; position: relative; }/* The Footer. Contains legal notices. */#footer { width: 800px; height: 115px; background-image:url('images/FITannica_05.gif'); position:relative; } ...if you see anything, please let me know! it'll save my sanity...love,jason
  2. i've been using the float property. it works pretty well...love,jason
  3. awesome, thank you SO much! i was about to resort to tables...:)love,jason
  4. sorry......if you look at the link, there are three columns, each with a div or two contained inside......below the three columns, there is another div......what i'm trying to do is get the bottom div to position itself 10px below the longest div in the three columns above......right now it appears to only respond to the length of the middle div in the three columns......does that make more sense?love,jason
  5. THIS LINK will send you to an issue i'm having with a set of three divs contained inside one larger div. after i close the container div, i've got another div below that only seems to want to respond to the center div......i used the float property to get the three divs next to each other. would this affect the container's reading of the height of the divs?...only the left and right divs have the float property enabled......any ideas?love,jason
  6. i think i sorta fixed it. the links are still valid. if you've got better methods, i'd love to hear them!love,jason
  7. i found a way to get three columns across, but now i need one column that spans the three......i thought i had it, but i can't get it to work in FF......you can click THIS LINK to see what i'm dealing with, and here's the code i'm using...CSS body { background-color: #404040; }div.header { width: 800px; height: 275px; background-image:url(images/FITannica_02.gif); padding:0; border:0; margin-top:0px; margin-bottom:0px; position:relative; top: 0; }div.body { width: 800px; height: auto; padding:0px; padding-bottom:1px; border:0; top:0px; margin-top:0px; margin-bottom:0px; position:relative; background-color: #E6E6E6; }div.footer { width: 800px; height: 115px; background-image:url(images/FITannica_05.gif); padding:0px; border:0; margin-top:0px; margin-bottom:0px; position:relative; }#container { position:absolute; top:0px; left:0px; width:100%; display:block; background:#404040; border:0; }div.colOne { float:left; height: auto; padding:0px; margin-left:5px; margin-right:0px; position: relative; }div.modC1 { width: 210px; height: auto; border: 2px dotted #404040; background-color: #FFFFFF; padding:0px; margin-left:0px; margin-right:0px; margin-bottom:10px; position: relative; }div.colTwo { height: auto; padding:0px; position: relative; top:0px; margin-left: 230px; display:block; }div.modC2 { width: 335px; height: auto; border: 2px dotted #404040; background-color: #FFFFFF; padding:0px; margin-left:0px; margin-right:0px; margin-bottom:10px; position: relative; }div.colThree { float:right; height: auto; padding:0px; margin-right:5px; position: relative; }div.modC3 { width: 210px; height: auto; border: 2px dotted #404040; background-color: #FFFFFF; padding:0px; margin-left:0px; margin-right:0px; margin-bottom:10px; position: relative; }div.modSpan { height: auto; border: 2px dotted #404040; background-color: #FFFFFF; padding:0px; margin:10px; position: relative; }p.content { font: 11px arial; text-align: justify; padding: 2px; } HTML <html><head><title>Dummy Site</title><link rel="stylesheet" href="css_sheet.css" type="text/css" media="screen,projection" /></head><body><div id="container" align="center"><div class="header"></div><div class="body" align="left"><div id="containter"><div class="colOne"><div class="modC1"><p class="content">Left Module One</p></div><div class="modC1"><p class="content">Left Module Two</p></div></div><div class="colThree"><div class="modC3"><p class="content">Right Module One</p></div><div class="modC3"><p class="content">Right Module Two</p></div></div><div class="colTwo"><div class="modC2"><p class="content">Center Module</p></div></div></div><div class="modSpan"><p class="content">This is the div that spans all three columns.</p></div></div><div class="footer"></div></div></body></html> ...any suggestions on how to make that uniform cross-browser? i'm getting lost...love,jason
  8. hopefully a simple question......how would i go about making three columns out of relatively positioned divs?...this is the problem i'm dealing with: LINK...any suggestions? each set of two should be in a column next to the two above it...love,jason
  9. i came up with something that's working. as usual, i'm up for suggestions to improve on this: $prevQ = "SELECT * FROM aKa_photo WHERE photoID < '$photoID' AND albumID = '$albumID' ORDER BY photoID ASC LIMIT 1"; $prevR = mysql_query($prevQ); $prev = mysql_fetch_array($prevR); if($prev['photoID'] != '') { $prevPic = 'pictures.php?id=' . $prev['photoID']; } else { $prevPic = 'pictures.php?album=' . $albumID; } $nextQ = "SELECT * FROM aKa_photo WHERE photoID > '$photoID' AND albumID = '$albumID' ORDER BY photoID ASC LIMIT 1"; $nextR = mysql_query($nextQ); $next = mysql_fetch_array($nextR); if($next['photoID'] != '') { $nextPic = 'pictures.php?id=' . $next['photoID']; } else { $nextPic = 'pictures.php?album=' . $albumID; } love,jason
  10. if i want to add a full-view option to my photo albums with a "previous" and "next" button, i need to first figure out the photoID of the previous and next photos......here's where i'm at right now: using $_GET variables, i'm displaying the photo as the user clicks on it (i.e. /photo.php?id=65). that's working fine, but what i need to be able to do is pull the ID out of the database for the previous and next entries, which may not be sequential......i'll be sorting by the albumID, which isn't a problem, and then ordering the table by the photoID ASC. does anyone know a trick to get the ID of the entries to add to a link?...i thought about putting this in SQL, but i figured that it belonged here since all the code will be in PHP. hope that wasn't faux pas...love,jason
  11. here's a solution i've come to. if someone's got a smarter way to do this, i'm all ears... $query = 'SELECT * FROM aKa_photo WHERE albumID="' . $_POST['albumID'] . '" ORDER BY photoID DESC LIMIT 1'; $result = mysql_query($query); $row = mysql_fetch_array($result); $i = substr($row['photoName'],-6,2) + 1; if($i <= 9) { $i = '0' . $i; } love,jason
  12. ...i would, except ALL photos are stored in this folder (a user can create multiple albums), and i'd like to index my photos sequentially by album whenever possible......i'm going to use the substr() function to grab the two numbers (since my file extensions are always four characters - .jpg, .gif - i'm just going to use "$int = substr($photo, -6, 2);" and pull that out. will my script treat $int as a number?love,jason
  13. i'm having an issue with a photo upload/rename. the photos get a sequential name (AlbumOne01.jpg, AlbumOne02.jpg, etc.) when the user uploads them. this is determined by a script that counts the number of rows and adds one to the returned value......when i delete a photo, that leaves me with the last photo having a value (say, AlbumOne13.jpg) while my MySQL row query will only return 12 rows, meaning the next photo will upload as "AlbumOne13.jpg" as well. and this is, of course, bad......what i'm thinking is going to be the solution is to parse the name of the last uploaded photo for its integer value and adding one to THAT, keeping my numbers running smoothly......my problem is, i don't know how to grab that integer out of the name......which function will get "13" from "AlbumOne13.jpg"?...thanks for any help!love,jason
  14. hey, now......perfect!...thanks again!love,jason
  15. hey, everyone!...i've got a whole new problem: i've built a photo album that allows a user to create a photo album and add photos to it......the problem i'm having is that when i attempt to show the thumbnails in a table that is 5x[whatever], i get stuck at my first row......i'm looking for a way to loop through the contents of my table, grabbing the first five thumbs, then printing a "</tr><tr>" before continuing with the next five. i'd like to be able to allow my users to theoretically upload as many photos as they want to, so if anyone's got an idea on how to set the loop up to be potentially infinite, i'd really appreciate it......this is the code that i'm using (that only works for the first five thumbs and fails when i attempt to add the "</tr><tr>"): $query = 'SELECT * FROM aKa_photo WHERE albumID="' . $albumID . '"'; $result = mysql_query($query); $i = 1; if(mysql_num_rows($result) >= 5) { while($photo = mysql_fetch_array($result)) { if($i <= 5) { echo '<td width="85px" height="85px" align="center">' . '<a href="' . $photo['photoPath'] . $photo['photoName'] . '" target="_blank">' . '<img src="' . $photo['photoPath'] . 'thumbs/' . $photo['photoThumb'] . '">' . '</a>' . '</td>'; $i++; } echo '</tr><tr>'; if($i <= 10) { echo '<td width="85px" height="85px" align="center">' . '<a href="' . $photo['photoPath'] . $photo['photoName'] . '" target="_blank">' . '<img src="' . $photo['photoPath'] . 'thumbs/' . $photo['photoThumb'] . '">' . '</a>' . '</td>'; $i++; } } } else { while($photo = mysql_fetch_array($result)) { if($i <= mysql_num_rows($result)) { echo '<td width="85px" height="85px" align="center">' . '<a href="' . $photo['photoPath'] . $photo['photoName'] . '" target="_blank">' . '<img src="' . $photo['photoPath'] . 'thumbs/' . $photo['photoThumb'] . '">' . '</a>' . '</td>'; $i++; } } $diff = 5 - mysql_num_rows($result); while($i <= $diff) { echo '<td width="85px" height="85px" align="center">' . '</td>'; $i++; } } echo '</tr>'; ?> ...i'm aware that this code has issues all over it. i wasn't really sure how to troubleshoot the while() loops, which is why i'm here again......thanks, guys!love,jason
  16. awesome! as always, it worked like a charm...love,jason
  17. what's happening when you run your script?...are you getting an error? or is it just running you in circles?love,jason
  18. -->index.php (This is the displayed file) <?php require 'update/aKa_db-connect.php'; $query = 'SELECT * FROM aKa_content WHERE contentID=1'; $result = mysql_query($query); $text = mysql_fetch_array($result); $contentText = $text['contentText']; $pageName = 'home'; include('aKa_siteLook.php'); echo $siteLook; echo '<p class="content">' . $contentText . '</p>'; echo $siteFoot; echo $emailBox; echo $eventBox; echo '</body></html>';?> -->aKa_siteLook.php ($eventBox calls the include()) <?php $siteLook = '<html><head>' . '<title>American Karate Academy - Whitefish, MT</title>' . '<link rel="stylesheet" href="aKa.css" type="text/css" media="screen,projection" />' .'<link rel="SHORTCUT ICON" href="favicon.ico">' . '</head>' . '<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">' . '<table width="801" height="656" border="0" cellpadding="0" cellspacing="0">' . '<tr>' . '<td rowspan="2" align="left" valign="top" ' . 'background="images/aKa_siteLook_01.gif" width="224" height="206" alt=""></td>' . '<td align="left" valign="top" background="images/aKa_' . $pageName . '_02.gif" width="350" height="133" alt=""></td>' . '<td rowspan="10" align="left" valign="top" ' . 'background="images/aKa_siteLook_03.gif" width="226" height="655" alt=""></td>' . '<td background="images/spacer.gif" width="1" height="133" alt=""></td>' . '</tr><tr>' . '<td rowspan="9" align="left" valign="top" ' . 'background="images/aKa_siteLook_05.gif" width="350" height="522" alt=""></td>' . '<td background="images/spacer.gif" width="1" height="73" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="index.php"><img src="images/aKa_' . $pageName . '_06.gif" width="224" height="30" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="30" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="about.php"><img src="images/aKa_' . $pageName . '_07.gif" width="224" height="27" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="27" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="schedule.php"><img src="images/aKa_' . $pageName . '_08.gif" width="224" height="27" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="27" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="pictures.php"><img src="images/aKa_' . $pageName . '_09.gif" width="224" height="29" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="29" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="contact.php"><img src="images/aKa_' . $pageName . '_10.gif" width="224" height="27" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="27" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="praise.php"><img src="images/aKa_' . $pageName . '_11.gif" width="224" height="28" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="28" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="FAQ.php"><img src="images/aKa_' . $pageName . '_12.gif" width="224" height="26" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="26" alt=""></td>' . '</tr><tr>' . '<td rowspan="2" align="left" valign="top" ' . 'background="images/aKa_siteLook_13.gif" width="224" height="256" alt=""></td>' . '<td background="images/spacer.gif" width="1" height="255" alt=""></td>' . '</tr><tr>' . '<td colspan="2" background="images/aKa_siteLook_14.gif" ' . 'width="576" height="1" alt=""></td>' . '<td background="images/spacer.gif" width="1" height="1" alt=""></td>' . '</tr></table><div class="contentColor"></div><div class="content">'; $siteUpdate = '<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">' . '<table width="801" height="656" border="0" cellpadding="0" cellspacing="0">' . '<tr>' . '<td rowspan="2" align="left" valign="top" ' . 'background="images/aKa_siteLook_01.gif" width="224" height="206" alt=""></td>' . '<td align="left" valign="top" background="images/aKa_' . $pageName . '_02.gif" width="350" height="133" alt=""></td>' . '<td rowspan="10" align="left" valign="top" ' . 'background="images/aKa_siteLook_03.gif" width="226" height="655" alt=""></td>' . '<td background="images/spacer.gif" width="1" height="133" alt=""></td>' . '</tr><tr>' . '<td rowspan="9" align="left" valign="top" ' . 'background="images/aKa_siteLook_05.gif" width="350" height="522" alt=""></td>' . '<td background="images/spacer.gif" width="1" height="73" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="index.php"><img src="images/aKa_' . $pageName . '_06.gif" width="224" height="30" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="30" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="about.php"><img src="images/aKa_' . $pageName . '_07.gif" width="224" height="27" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="27" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="schedule.php"><img src="images/aKa_' . $pageName . '_08.gif" width="224" height="27" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="27" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="pictures.php"><img src="images/aKa_' . $pageName . '_09.gif" width="224" height="29" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="29" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="contact.php"><img src="images/aKa_' . $pageName . '_10.gif" width="224" height="27" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="27" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="praise.php"><img src="images/aKa_' . $pageName . '_11.gif" width="224" height="28" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="28" alt=""></td>' . '</tr><tr><td align="left" valign="top">' . '<a href="FAQ.php"><img src="images/aKa_' . $pageName . '_12.gif" width="224" height="26" border="0"></a></td>' . '<td background="images/spacer.gif" width="1" height="26" alt=""></td>' . '</tr><tr>' . '<td rowspan="2" align="left" valign="top" ' . 'background="images/aKa_siteLook_13.gif" width="224" height="256" alt=""></td>' . '<td background="images/spacer.gif" width="1" height="255" alt=""></td>' . '</tr><tr>' . '<td colspan="2" background="images/aKa_siteLook_14.gif" ' . 'width="576" height="1" alt=""></td>' . '<td background="images/spacer.gif" width="1" height="1" alt=""></td>' . '</tr></table>'; $emailBox = '<div class="email"><h3 class="email">' . 'Join Our Newsletter!' . '</h3><p class="email">' . 'Keep up to date with<br/>' . 'American Karate Academy<br/>' . 'news and events with our<br/>' . 'FREE Newsletter!' . '</p>' . '<form action="aKa_emailList.php" method="post">' . '<input type="text" class="w100">' . '<input type="submit" value="Join!" class="w50"></div>' . '<div class="emailColor"><h3 class="email">' . 'Join Our Newsletter!' . '</h3><p class="email">' . 'Keep up to date with<br/>' . 'American Karate Academy<br/>' . 'news and events with our<br/>' . 'FREE Newsletter!' . '</p>' . '<form action="aKa_emailList.php" method="post">' . '<input type="text" name="emailList" class="w100">' . '<input type="submit" value="Join!" class="w50"></div>'; $eventBox = include('eventBox.php'); $siteFoot = '</div>';?> NOTE: i can't see how anything but the "$eventBox = include('eventBox.php');" would affect anything about the load order, but that shows you how the HTML should be printed as i call it in "index.php"...-->eventBox.php (this runs a handful of functions and prints out my formatted eventBox <div>) <?php $currentTime = time() - 3 * 60 * 60; $query = mysql_query('SELECT * FROM aKa_event WHERE eventTimestamp>="' .$currentTime .'" ORDER BY eventTimestamp ASC LIMIT 3'); echo '<div class="event"><h3 class="email">' . 'Upcoming Events:' . '</h3>'; while($display = mysql_fetch_array($query)) { $AMPM = 'AM'; if($display['eventAMPM'] == 12) { $AMPM = 'PM'; } switch($display['eventMonth']) { case '1': $monthName = '01'; break; case '2': $monthName = '02'; break; case '3': $monthName = '03'; break; case '4': $monthName = '04'; break; case '5': $monthName = '05'; break; case '6': $monthName = '06'; break; case '7': $monthName = '07'; break; case '8': $monthName = '08'; break; case '9': $monthName = '09'; break; case '10': $monthName = '10'; break; case '11': $monthName = '11'; break; case '12': $monthName = '12'; break; default: case '': $monthName = 'ERROR!'; break; } switch($display['eventYear']) { case '2006': $yearName = '06'; break; case '2007': $yearName = '07'; break; case '2008': $yearName = '08'; break; default: case '': $yearName = 'ERROR!'; break; } switch($display['eventDay']) { case '1': $dayName = '01'; break; case '2': $dayName = '02'; break; case '3': $dayName = '03'; break; case '4': $dayName = '04'; break; case '5': $dayName = '05'; break; case '6': $dayName = '06'; break; case '7': $dayName = '07'; break; case '8': $dayName = '08'; break; case '9': $dayName = '09'; break; case '10': $dayName = '10'; break; case '11': $dayName = '11'; break; case '12': $dayName = '12'; break; case '13': $dayName = '13'; break; case '14': $dayName = '14'; break; case '15': $dayName = '15'; break; case '16': $dayName = '16'; break; case '17': $dayName = '17'; break; case '18': $dayName = '18'; break; case '19': $dayName = '19'; break; case '20': $dayName = '20'; break; case '21': $dayName = '21'; break; case '22': $dayName = '22'; break; case '23': $dayName = '23'; break; case '24': $dayName = '24'; break; case '25': $dayName = '25'; break; case '26': $dayName = '26'; break; case '27': $dayName = '27'; break; case '28': $dayName = '28'; break; case '29': $dayName = '29'; break; case '30': $dayName = '30'; break; case '31': $dayName = '31'; break; default: case '': $dayName = 'ERROR!'; break; } $description = explode(' ', $display['eventDescription']); $i = 0; echo '<p class="event">' . '<table width="100%" border="0" cellpadding="0" ' . 'cellspacing="0"><tr><td align="left">' . '<p class="eventTitle"><b>' .$monthName .'/' .$dayName .'/' .$yearName .' | ' . $display['eventTitle'] .'</b></p></td><td align="right">' . '</td></tr><tr><td>' . '<p class="eventDescription">'; while ($i <= 9) { echo stripslashes($description[$i]) . ' '; $i++; } echo '...</p>' . '</td></tr><tr><td colspan="2" align="right">' . '<a href="event.php?eventID=' . $display['eventID'] . '" class="eventLink">(view)</a>' . '<hr color="FFFFFF" width="95%" style="margin-top:0px; ' . 'margin-bottom:0px"></td></tr></table>'; } echo '<table width="100%" border="0" cellpadding="0" ' . 'cellspacing="0">' . '<tr><td align="right">' . '<a href="event.php?eventID=all" class="eventLink">(view all)</a>' . '</td></tr></table></div>'; $query = mysql_query('SELECT * FROM aKa_event WHERE eventTimestamp>="' .$currentTime .'" ORDER BY eventTimestamp ASC LIMIT 3'); echo '<div class="eventColor"><h3 class="email">' . 'Upcoming Events:' . '</h3>'; while($display = mysql_fetch_array($query)) { $AMPM = 'AM'; if($display['eventAMPM'] == 12) { $AMPM = 'PM'; } switch($display['eventMonth']) { case '1': $monthName = '01'; break; case '2': $monthName = '02'; break; case '3': $monthName = '03'; break; case '4': $monthName = '04'; break; case '5': $monthName = '05'; break; case '6': $monthName = '06'; break; case '7': $monthName = '07'; break; case '8': $monthName = '08'; break; case '9': $monthName = '09'; break; case '10': $monthName = '10'; break; case '11': $monthName = '11'; break; case '12': $monthName = '12'; break; default: case '': $monthName = 'ERROR!'; break; } switch($display['eventYear']) { case '2006': $yearName = '06'; break; case '2007': $yearName = '07'; break; case '2008': $yearName = '08'; break; default: case '': $yearName = 'ERROR!'; break; } switch($display['eventDay']) { case '1': $dayName = '01'; break; case '2': $dayName = '02'; break; case '3': $dayName = '03'; break; case '4': $dayName = '04'; break; case '5': $dayName = '05'; break; case '6': $dayName = '06'; break; case '7': $dayName = '07'; break; case '8': $dayName = '08'; break; case '9': $dayName = '09'; break; case '10': $dayName = '10'; break; case '11': $dayName = '11'; break; case '12': $dayName = '12'; break; case '13': $dayName = '13'; break; case '14': $dayName = '14'; break; case '15': $dayName = '15'; break; case '16': $dayName = '16'; break; case '17': $dayName = '17'; break; case '18': $dayName = '18'; break; case '19': $dayName = '19'; break; case '20': $dayName = '20'; break; case '21': $dayName = '21'; break; case '22': $dayName = '22'; break; case '23': $dayName = '23'; break; case '24': $dayName = '24'; break; case '25': $dayName = '25'; break; case '26': $dayName = '26'; break; case '27': $dayName = '27'; break; case '28': $dayName = '28'; break; case '29': $dayName = '29'; break; case '30': $dayName = '30'; break; case '31': $dayName = '31'; break; default: case '': $dayName = 'ERROR!'; break; } $description = explode(' ', $display['eventDescription']); $i = 0; echo '<p class="event">' . '<table width="100%" border="0" cellpadding="0" ' . 'cellspacing="0"><tr><td align="left">' . '<p class="eventTitle"><b>' .$monthName .'/' .$dayName .'/' .$yearName .' | ' . $display['eventTitle'] .'</b></p></td><td align="right">' . '</td></tr><tr><td>' . '<p class="eventDescription">'; while ($i <= 9) { echo stripslashes($description[$i]) . ' '; $i++; } echo '...</p>' . '</td></tr><tr><td colspan="2" align="right">' . '<a href="event.php?eventID=' . $display['eventID'] . '" class="eventLink">(view)</a>' . '<hr color="FFFFFF" width="95%" style="margin-top:0px; ' . 'margin-bottom:0px"></td></tr></table>'; } echo '<table width="100%" border="0" cellpadding="0" ' . 'cellspacing="0">' . '<tr><td align="right">' . '<a href="event.php?eventID=all" class="eventLink">(view all)</a>' . '</td></tr></table></div>';?> NOTE: the code repeats itself to clear up an opacity issue i had. in order to get a transparency on the background and opaque text, my solution was to run the div once with the alpha set at 60% and the background color set, then run a transparent background 100% alpha <div> with the same text. sloppy? probably......sorry about all the code. i was hesitant to post it because i knew it would be ridiculously long......if my understanding of the way it should be reading my scripts is correct, then the include() shouldn't run until it's called in the variable. however, i think when "aKa_siteLook.php" is required, the include() runs regardless. my update page is displaying an eventBox that isn't called now......i've tried defining a function and calling it from the variable like so: function eventBox() { include('eventBox.php'); }$eventBox = eventBox(); but that had the same glitch......i tried calling that function from the display page itself, which i see as possibly the most logical way to avoid this problem, but that left me with an error reading "call to an undefined function 'eventBox()'" which leads me to believe that i needed an extra step to make a function from an included file hold valid in the file that called it......anyways. if you guys know something that might help, i'm ALL ears...love,jason
  19. THIS is the beta site i'm working on. the glitch is across the board, so any link should cause the problem......i've tried both FF and IE, both causing a variation of the same problem......thanks!love,jason
  20. hey, guys!...so i've wrestled my current project to within inches of completion, and now i've got a small-but-annoying problem that i can't seem to figure out......my site is formatted from an included file called "siteLook.php" that contains all of the tables and images and divs and so on. within my "siteLook.php" file, there is a call to include a file called "eventBox.php" that holds an event calendar and all the code to run it......all of it works, but it's loading in a rather unsavory way: the data for "eventBox.php" loads first, displaying on the screen for a second or two before giving way to the properly formatted page......the call to the $eventBox variable (this calls to "siteLook.php" and activates the include() function for "eventBox.php") is the last thing in the script aside from the closing HTML tags for the page......i'm not sure how to combat this problem, so if anyone knows where i could find a resource that would help me out or has had this problem and knows a fix, i'd be extremely grateful......also, i didn't want to post my code because i wasn't sure which bits would be useful in seeing where the problem lies, and posting all three files seemed cumbersome...love,jason
  21. my question, hopefully, is slap-your-forehead easy......how do i force the output of a variable containing '0' to output '00'?...thanks!love,jason
  22. oh, one more quick question: what's the right starting place to re-select the values from my dropdowns when my user edits a date entry?...i'll be saving a timestamp and an eventID, plus a table entry for eventMonth, eventDay, eventYear, eventHour, and eventMinutes. each of those table entries will be determined by the value of a dropdown box with the same name as its corresponding table entry......is there a way to use the eventID to pull the entry off the database and cause my dropdowns to select the proper values to match up with the database entries? or will my user have to re-enter all the information when they edit an entry?...thanks!love,jason
  23. now, i read something about that a half hour ago that left me just as confused as when i hadn't read it......have you considered writing manuals? ...thanks, you've been a huge help, as always...love,jason
  24. ok, that makes sense, i think......one quick question, though: according to the format of that function, do i need to pass the seconds through if i want to add the date?so, if i have a dropdown for Hour, Minutes, Month, Day, Year, declared as variables of the same names, i would need to pass the following to the mktime() function:int mktime($hour, $minutes, '00', $month, $day, $year);...also, i'm a little confused about things like daylight savings and leap year......if i'm saving a date (say February 29th), will i need an additional function to make that work correctly? or if it's not a leap year and my user puts in February 29th, do i need an additional function to turn that to March 1st?...this time stuff really confuses me. sorry for all of the questions...love,jason
  25. alright, let me rephrase; i think i was unclear......i'm hoping to have a backend page for the user where they can add an event using a dropdown for Day, Month, Year, Hour, Minutes. how do i take the contents of those dropdowns and put them into MySQL as a valid date entry?...then, how do i pull them out and display them in chronological order, starting with the next future event......does that make a little more sense than my first question?love,jason
×
×
  • Create New...