Jump to content

Skipjackrick

Members
  • Posts

    196
  • Joined

  • Last visited

    Never

Everything posted by Skipjackrick

  1. I am having trouble displaying data as I would like. The following code displays data when SUM(points) = 0 Well, there are a sheetload of people that haven't scored points and I don't want to include them on the standings page if they have zero points. For example something like this in beginners terms, if SUM(points) > 0 { display result} else { don't display result } I tried using an if else statement in there somewhere but I kept getting parse errors. I am not sure how to go about doing it right. <?php $query_sum = "SELECT angler, SUM(points) FROM submit WHERE yyyy=2008 AND region_id=1 GROUP BY angler ORDER BY SUM(points)DESC"; $result = mysql_query($query_sum) or die(mysql_error()); $kayakwars_header=<<<EOD <h2><Center>Kayak Wars 2008 Angler Standings (Western Gulf)</center></h2> <table width='400' align='center'> <tr> <th>Rank</th> <th>Angler</th> <th>Points</th> </tr> EOD; $rank=1; while($row = mysql_fetch_array($result)) { $angler = $row['angler']; $points = $row['SUM(points)']; $kayakwars_details .=<<<EOD <tr> <td align='center'>$rank</td> <td align='center'>$angler</td> <td align='center'>$points</td> </tr> EOD; $rank++; } $kayakwars_footer ="</table>"; $kayak_wars =<<<KAYAKWARS $kayakwars_header $kayakwars_details $kayakwars_footer KAYAKWARS; print $kayak_wars; ?>
  2. WOW!! HAHAHA!! Can you tell I am a beginner?? Thanks, I will start working on it pronto.
  3. So can anybody help me figure out why the sub-list shows up about 50px too far to the right when viewed with Internet Explorer?? I have tried to just hack away at the code changing each variable and this is the best I can come up with. Firefox displays perfectly. http://www.extremecoast.com/Kayak_Wars/standings07.html If any of you guys know. I'd really appreciate it. Just in case you need the CSS files. @charset "UTF-8"; /* SpryMenuBarHorizontal.css - Revision: Spry Preview Release 1.4 */ /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */ /******************************************************************************* LAYOUT INFORMATION: describes box model, positioning, z-order *******************************************************************************/ ul, ol, dl { position: relative; } /* The outermost container of the Menu Bar, an auto width box with no margin or padding */ ul.MenuBarHorizontal { margin: 0; padding: 0; list-style-type: none; font-size: 100%; cursor: default; width: auto; } /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */ ul.MenuBarActive { z-index: 1000; } /* Menu item containers, position children relative to this container and are a fixed width */ ul.MenuBarHorizontal li { margin: 0; padding: 0; list-style-type: none; font-size: 100%; position: relative; text-align: left; cursor: pointer; width: 100%; float: left; } /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */ ul.MenuBarHorizontal ul { margin: 0; padding: 0; list-style-type: none; font-size: 10px; z-index: 1020; cursor: default; width: 100px; position: absolute; left: -1000em; top: 80%; } /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */ ul.MenuBarHorizontal ul.MenuBarSubmenuVisible { left: auto; } /* Menu item containers are same fixed width as parent */ ul.MenuBarHorizontal ul li { width: 15em; } /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */ ul.MenuBarHorizontal ul ul { position: absolute; margin: -5% 0 0 95%; } /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */ ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible { left: auto; top: 0; } /******************************************************************************* DESIGN INFORMATION: describes color scheme, borders, fonts *******************************************************************************/ /* Submenu containers have borders on all sides */ ul.MenuBarHorizontal ul { border: black; } /* Menu items are a light gray block with padding and no text decoration */ ul.MenuBarHorizontal a { display: block; cursor: pointer; background-color: transparent; padding: 0.5em 0.75em; color: #333; text-decoration: none; } ul.MenuBarHorizontal ul li { display: block; cursor: pointer; background-color: #0099FF; padding: 0; color: #333; text-decoration: none; } /* Menu items that have mouse over or focus have a blue background and white text */ ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus { background-color: transparent; color: #FFF; } /* Sub Menu items that have mouse over or focus have a blue background and white text */ ul.MenuBarHorizontal ul li a:hover, ul.MenuBarHorizontal ul li a:focus { background-color: transparent; color: #FFF; } /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */ ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible { background-color: transparent; color: #FFF; } /******************************************************************************* SUBMENU INDICATION: styles if there is a submenu under a given menu item *******************************************************************************/ /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal a.MenuBarItemSubmenu { background-image: url(SpryMenuBarDown.gif); background-repeat: no-repeat; background-position: 95% 50%; } /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal ul a.MenuBarItemSubmenu { background-image: url(SpryMenuBarRight.gif); background-repeat: no-repeat; background-position: 95% 50%; } /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal a.MenuBarItemSubmenuHover { background-image: url(SpryMenuBarDownHover.gif); background-repeat: no-repeat; background-position: 95% 50%; } /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover { background-image: url(SpryMenuBarRightHover.gif); background-repeat: no-repeat; background-position: 95% 50%; } /******************************************************************************* BROWSER HACKS: the hacks below should not be changed unless you are an expert *******************************************************************************/ /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */ ul.MenuBarHorizontal iframe { position: absolute; z-index: 1010; } /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */ @media screen, projection { ul.MenuBarHorizontal li.MenuBarItemIE { display: inline; f\loat: left; background: #FFF; } } /* Top Elements */ * { margin: 0; padding: 0; outline: 0 } body { background: #CCC; font: 70%/1.5em Verdana, Tahoma, arial, sans-serif; color: #555; text-align: center; } /* links */ a, a:visited { text-decoration: none; color: #2180BC; background: inherit; } a:hover { color: #606060; background: inherit; text-decoration: underline; } /* headers */ h1, h2, h3 { font-family: 'Trebuchet MS', Tahoma, Sans-serif; } h1 { font-size: 150%; font-weight: normal; color: #006699; } h2 { font-size: 140%; text-transform: uppercase; color: #006699; } h3 { font-size: 120%; color: #666666; } /* images */ img { background: #FAFAFA; border: 1px solid #E5E5E5; padding: 5px; } img.float-right { margin: 5px 0px 10px 10px; } img.float-left { margin: 5px 10px 10px 0px; } h1, h2, h3, p { padding: 10px; margin: 0; } ul, ol { margin: 5px 20px; padding: 0 20px; } code { margin: 5px 0; padding: 10px; text-align: left; display: block; overflow: auto; font: 500 1em/1.5em 'Lucida Console', 'courier new', monospace ; /* white-space: pre; */ background: #FAFAFA; border: 1px solid #f2f2f2; } acronym { cursor: help; border-bottom: 1px dotted #777; } blockquote { margin: 10px; padding: 0 0 0 28px; border: 1px solid #f2f2f2; background: #FAFAFA url(quote.gif) no-repeat 5px 5px; } /* start - table */ table { border-collapse: collapse; margin: 10px auto; } th strong { color: #fff; } th { background: #006699; height: 29px; padding-left: 12px; padding-right: 12px; color: #FFF; text-align: center; border-left: 1px solid #B6D59A; border-bottom: solid 2px #FFF; } tr { height: 30px; } td { padding-left: 11px; padding-right: 11px; border-left: 1px solid #FFF; border-bottom: solid 1px #ffffff; } td.first,th.first { border-left: 0px; } tr.row-a { background: #F8F8F8; } tr.row-b { background: #EFEFEF; } /* end - table */ /* form elements */ form { margin:10px; padding: 0 10px; background-color: #FFF; } label { display:block; font-weight:bold; margin:5px 0; } input { padding:2px; border:1px solid #eee; font: normal 1em Verdana, sans-serif; color:#777; } textarea { width:400px; padding:2px; font: normal 1em Verdana, sans-serif; border:1px solid #eee; height:100px; display:block; color:#777; } input.button { font: bold 12px Arial, Sans-serif; height: 24px; margin: 0; padding: 2px 3px; color: #FFF; border: none; background-color: #003399; background-image: url(button-bg.jpg); background-repeat: repeat-x; background-position: 0 0; } /* search form */ .searchform { background-color: transparent; border: none; margin: 0; padding: 5px 0 15px 0; width: 190px; } .searchform p { margin: 0; padding: 0; } .searchform input.textbox { width: 120px; color: #777; height: 18px; padding: 2px; border: 1px solid #E5E5E5; vertical-align: top; } .searchform input.button { width: 60px; height: 24px; padding: 2px 5px; vertical-align: top; } /******************************************** LAYOUT ********************************************/ #wrap { width: 820px; background: #CCC url(content.jpg) repeat-y center top; margin: 0 auto; text-align: left; } #content-wrap { clear: both; width: 760px; padding: 0; margin: 10px auto; } #header { width: 820px; position: relative; height: 103px; background: #CCC url(header.jpg) no-repeat center top; padding: 0; color: #FFF; } #header h1#logo-text a { position: absolute; margin: 0; padding: 0; font: bolder 44px 'Trebuchet MS', Arial, Sans-serif; letter-spacing: -2px; color: #FFF; text-transform: none; text-decoration: none; background: transparent; /* change the values of top and left to adjust the position of the logo*/ top: 31px; left: 47px; } #header p#slogan { position: absolute; margin: 0; padding: 0; font: normal 12px 'Trebuchet MS', Arial, Sans-serif; text-transform: none; color: #FFF; /* change the values of top and left to adjust the position of the slogan*/ top: 86px; left: 55px; width: 192px; } /* header links */ #header #header-links { position: absolute; top: 20px; right: 30px; color: #C6DDEE; font-size: 10px; } #header #header-links a { color: #FFF; text-decoration: none; } #header #header-links a:hover { color: #606060; } /* Menu */ #menu { clear: both; margin: 0 auto; padding: 0; background: url(menu.jpg) repeat-x 0 0; font: bold 12px/37px Verdana, Arial, Tahoma, Sans-serif; height: 37px; width: 780px; } #menu ul { background-color: transparent; float: right; list-style: none; margin:0; padding: 0; display: inline; } #menu li { background-color: transparent; display: inline; } #menu ul li a { display: block; float: left; padding: 0 12px; color: #FFFEA7; text-decoration: none; } #menu ul li.last a { padding-right: 20px; } #menu ul li a:hover { color: #606060; } #menu ul li#current a { color: #D4E59F; } /* Main Column */ #main { float: left; width: 98%; padding: 0; margin: 5px 0 0 5px; display: inline; } #main h2 { margin: 10px auto; font: Bold 140% 'Trebuchet MS', Tahoma, Sans-serif; color: #003399; padding: 5px 0 5px 5px; border-bottom: 1px solid #EFF0F1; text-transform: none; } #main h2 a { background: none; color: #003399; text-decoration: none; } #main ul li { list-style-image: url(bullet.gif); } .post-footer { padding: 5px; margin: 20px 10px 10px 10px; font-size: 95%; } .post-footer .date { background: url(clock.gif) no-repeat left center; padding-left: 20px; margin: 0 10px 0 5px; } .post-footer .comments { background: url(comment.gif) no-repeat left center; padding-left: 20px; margin: 0 10px 0 5px; } .post-footer .readmore { background: url(page.gif) no-repeat left center; padding-left: 20px; margin: 0 10px 0 5px; } /* Sidebar */ #sidebar { float: right; width: 26.5%; padding: 0; margin: 0; color: #68774A; } #sidebar h3 { margin-top: 10px; padding: 5px 5px; font: bold 1.4em 'Trebuchet MS', Tahoma, Sans-serif; color: #003399; } #sidebar ul.sidemenu { list-style: none; text-align: left; margin: 7px 4px 8px 0; padding: 0; text-decoration: none; background: url(dots.jpg) repeat-x left top; } #sidebar ul.sidemenu li { list-style: none; background: url(dots.jpg) repeat-x left bottom; padding: 4px 0 4px 5px; margin: 0 2px; color: #68774A; } * html body #sidebar ul.sidemenu li { height: 1%; } #sidebar ul.sidemenu li a { text-decoration: none; background-image: none; color: #666666; } #sidebar ul.sidemenu li a:hover { color: #1773BC; } #sidebar ul.sidemenu ul { margin: 0 0 0 5px; padding: 0; } #sidebar ul.sidemenu ul li { background: none; } /* Footer */ #footer { color: #C6DDEE; background: #CCC url(footer.jpg) no-repeat center top; clear: both; width: 820px; height: 65px; text-align: center; font-size: 92%; } #footer a { color: #FFF; text-decoration: none; } /* alignment classes */ .float-left { float: left; } .float-right { float: right; } .align-left { text-align: left; } .align-right { text-align: center; } /* display and additional classes */ .clear { clear: both; }
  4. Got it. Thanks for that article. I've got it fixed for now but I need to go back and edit a few things. I am just thankful it was only in the CSS file and I didn't have to edit 30 other pages to fix that.
  5. I am confused? Do I need to set something in my CSS file?
  6. Well, IE is used by 80% of the people that view my web pages and for some reason my page is not being displayed properly with IE. Firefox works fine. Can anybody give me an idea why? I updated IE to the latest. Java is updated to the latest? Something with my CSS? or Javascript? http://www.extremecoast.com/Kayak_Wars/index.html the CSS file /******************************************** HTML ELEMENTS ********************************************/ /* Top Elements */ * { margin: 0; padding: 0; outline: 0 } body { background: #CCC; font: 70%/1.5em Verdana, Tahoma, arial, sans-serif; color: #555; text-align: center; } /* links */ a, a:visited { text-decoration: none; color: #2180BC; background: inherit; } a:hover { color: #606060; background: inherit; text-decoration: underline; } /* headers */ h1, h2, h3 { font-family: 'Trebuchet MS', Tahoma, Sans-serif; } h1 { font-size: 150%; font-weight: normal; color: #006699; } h2 { font-size: 140%; text-transform: uppercase; color: #006699; } h3 { font-size: 120%; color: #666666; } /* images */ img { background: #FAFAFA; border: 1px solid #E5E5E5; padding: 5px; } img.float-right { margin: 5px 0px 10px 10px; } img.float-left { margin: 5px 10px 10px 0px; } h1, h2, h3, p { padding: 10px; margin: 0; } ul, ol { margin: 5px 20px; padding: 0 20px; } code { margin: 5px 0; padding: 10px; text-align: left; display: block; overflow: auto; font: 500 1em/1.5em 'Lucida Console', 'courier new', monospace ; /* white-space: pre; */ background: #FAFAFA; border: 1px solid #f2f2f2; } acronym { cursor: help; border-bottom: 1px dotted #777; } blockquote { margin: 10px; padding: 0 0 0 28px; border: 1px solid #f2f2f2; background: #FAFAFA url(quote.gif) no-repeat 5px 5px; } /* start - table */ table { border-collapse: collapse; margin: 10px auto; } th strong { color: #fff; } th { background: #006699; height: 29px; padding-left: 12px; padding-right: 12px; color: #FFF; text-align: center; border-left: 1px solid #B6D59A; border-bottom: solid 2px #FFF; } tr { height: 30px; } td { padding-left: 11px; padding-right: 11px; border-left: 1px solid #FFF; border-bottom: solid 1px #ffffff; } td.first,th.first { border-left: 0px; } tr.row-a { background: #F8F8F8; } tr.row-b { background: #EFEFEF; } /* end - table */ /* form elements */ form { margin:10px; padding: 0 10px; background-color: #FFF; } label { display:block; font-weight:bold; margin:5px 0; } input { padding:2px; border:1px solid #eee; font: normal 1em Verdana, sans-serif; color:#777; } textarea { width:400px; padding:2px; font: normal 1em Verdana, sans-serif; border:1px solid #eee; height:100px; display:block; color:#777; } input.button { font: bold 12px Arial, Sans-serif; height: 24px; margin: 0; padding: 2px 3px; color: #FFF; border: none; background-color: #003399; background-image: url(button-bg.jpg); background-repeat: repeat-x; background-position: 0 0; } /* search form */ .searchform { background-color: transparent; border: none; margin: 0; padding: 5px 0 15px 0; width: 190px; } .searchform p { margin: 0; padding: 0; } .searchform input.textbox { width: 120px; color: #777; height: 18px; padding: 2px; border: 1px solid #E5E5E5; vertical-align: top; } .searchform input.button { width: 60px; height: 24px; padding: 2px 5px; vertical-align: top; } /******************************************** LAYOUT ********************************************/ #wrap { width: 820px; background: #CCC url(content.jpg) repeat-y center top; margin: 0 auto; text-align: left; } #content-wrap { clear: both; width: 760px; padding: 0; margin: 10px auto; } #header { width: 820px; position: relative; height: 103px; background: #CCC url(header.jpg) no-repeat center top; padding: 0; color: #FFF; } #header h1#logo-text a { position: absolute; margin: 0; padding: 0; font: bolder 44px 'Trebuchet MS', Arial, Sans-serif; letter-spacing: -2px; color: #FFF; text-transform: none; text-decoration: none; background: transparent; /* change the values of top and left to adjust the position of the logo*/ top: 31px; left: 47px; } #header p#slogan { position: absolute; margin: 0; padding: 0; font: normal 12px 'Trebuchet MS', Arial, Sans-serif; text-transform: none; color: #FFF; /* change the values of top and left to adjust the position of the slogan*/ top: 86px; left: 55px; width: 192px; } /* header links */ #header #header-links { position: absolute; top: 20px; right: 30px; color: #C6DDEE; font-size: 10px; } #header #header-links a { color: #FFF; text-decoration: none; } #header #header-links a:hover { color: #606060; } /* Menu */ #menu { clear: both; margin: 0 auto; padding: 0; background: url(menu.jpg) repeat-x 0 0; font: bold 12px/37px Verdana, Arial, Tahoma, Sans-serif; height: 37px; width: 780px; } #menu ul { float: right; list-style: none; margin:0; padding: 0; } #menu ul li { display: inline; } #menu ul li a { display: block; float: left; padding: 0 12px; color: #FFF; text-decoration: none; } #menu ul li.last a { padding-right: 20px; } #menu ul li a:hover { color: #606060; } #menu ul li#current a { color: #D4E59F; } /* Main Column */ #main { float: left; width: 98%; padding: 0; margin: 5px 0 0 5px; display: inline; } #main h2 { margin: 10px auto; font: Bold 140% 'Trebuchet MS', Tahoma, Sans-serif; color: #003399; padding: 5px 0 5px 5px; border-bottom: 1px solid #EFF0F1; text-transform: none; } #main h2 a { background: none; color: #003399; text-decoration: none; } #main ul li { list-style-image: url(bullet.gif); } .post-footer { padding: 5px; margin: 20px 10px 10px 10px; font-size: 95%; } .post-footer .date { background: url(clock.gif) no-repeat left center; padding-left: 20px; margin: 0 10px 0 5px; } .post-footer .comments { background: url(comment.gif) no-repeat left center; padding-left: 20px; margin: 0 10px 0 5px; } .post-footer .readmore { background: url(page.gif) no-repeat left center; padding-left: 20px; margin: 0 10px 0 5px; } /* Sidebar */ #sidebar { float: right; width: 26.5%; padding: 0; margin: 0; color: #68774A; } #sidebar h3 { margin-top: 10px; padding: 5px 5px; font: bold 1.4em 'Trebuchet MS', Tahoma, Sans-serif; color: #003399; } #sidebar ul.sidemenu { list-style: none; text-align: left; margin: 7px 4px 8px 0; padding: 0; text-decoration: none; background: url(dots.jpg) repeat-x left top; } #sidebar ul.sidemenu li { list-style: none; background: url(dots.jpg) repeat-x left bottom; padding: 4px 0 4px 5px; margin: 0 2px; color: #68774A; } * html body #sidebar ul.sidemenu li { height: 1%; } #sidebar ul.sidemenu li a { text-decoration: none; background-image: none; color: #666666; } #sidebar ul.sidemenu li a:hover { color: #1773BC; } #sidebar ul.sidemenu ul { margin: 0 0 0 5px; padding: 0; } #sidebar ul.sidemenu ul li { background: none; } /* Footer */ #footer { color: #C6DDEE; background: #CCC url(footer.jpg) no-repeat center top; clear: both; width: 820px; height: 65px; text-align: center; font-size: 92%; } #footer a { color: #FFF; text-decoration: none; } /* alignment classes */ .float-left { float: left; } .float-right { float: right; } .align-left { text-align: left; } .align-right { text-align: center; } /* display and additional classes */ .clear { clear: both; }
  7. Anybody know of good CSS tutorials? Or references? some sites?
  8. I figured it out. I had to add the following to my submenu position layout. top: 80%;
  9. ARRRGGGHHH. Help! I can't seem to figure out why I can't position the submenu below the main menu choices. It always pops-up over the main menu choice. I have tried editing the values for the margin and it doesn't change anything??? Here is what it looks like through a browser. http://www.ectackle.com/index.html Can somebody help me figure out how to make the submenu pop-up below the main menu choices?? Here is the CSS where I think the problem is, but I included the full CSS at the bottom. /* Menu item containers, position children relative to this container and are a fixed width */ ul.MenuBarHorizontal li { margin: 0; padding: 0; list-style-type: none; font-size: 100%; position: relative; text-align: left; cursor: pointer; width: 100%; float: left; } /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */ ul.MenuBarHorizontal ul { margin: 0; padding: 0; list-style-type: none; font-size: 10px; z-index: 1020; cursor: default; width: 100%; position: absolute; left: -1000em; } /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */ ul.MenuBarHorizontal ul.MenuBarSubmenuVisible { left: auto; } /* Menu item containers are same fixed width as parent */ ul.MenuBarHorizontal ul li { width: 15em; } /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */ ul.MenuBarHorizontal ul ul { position: absolute; margin: -5% 0 0 95%; } /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */ ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible { left: auto; top: 0; } Full CSS document /******************************************************************************* LAYOUT INFORMATION: describes box model, positioning, z-order *******************************************************************************/ /* The outermost container of the Menu Bar, an auto width box with no margin or padding */ ul.MenuBarHorizontal { margin: 0; padding: 0; list-style-type: none; font-size: 100%; cursor: default; width: auto; } /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */ ul.MenuBarActive { z-index: 1000; } /* Menu item containers, position children relative to this container and are a fixed width */ ul.MenuBarHorizontal li { margin: 0; padding: 0; list-style-type: none; font-size: 100%; position: relative; text-align: left; cursor: pointer; width: 100%; float: left; } /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */ ul.MenuBarHorizontal ul { margin: 0; padding: 0; list-style-type: none; font-size: 10px; z-index: 1020; cursor: default; width: 100%; position: absolute; left: -1000em; } /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */ ul.MenuBarHorizontal ul.MenuBarSubmenuVisible { left: auto; } /* Menu item containers are same fixed width as parent */ ul.MenuBarHorizontal ul li { width: 15em; } /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */ ul.MenuBarHorizontal ul ul { position: absolute; margin: -5% 0 0 95%; } /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */ ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible { left: auto; top: 0; } /******************************************************************************* DESIGN INFORMATION: describes color scheme, borders, fonts *******************************************************************************/ /* Submenu containers have borders on all sides */ ul.MenuBarHorizontal ul { border: ; } /* Menu items are a light gray block with padding and no text decoration */ ul.MenuBarHorizontal a { display: block; cursor: pointer; background-color: clear; padding: 0.5em 0.75em; color: #333; text-decoration: none; } ul.MenuBarHorizontal ul li { display: block; cursor: pointer; background-color: #3399FF; padding: 0; color: #333; text-decoration: none; } /* Menu items that have mouse over or focus have a blue background and white text */ ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus { background-color: clear; color: #FFF; } /* Sub Menu items that have mouse over or focus have a blue background and white text */ ul.MenuBarHorizontal ul li a:hover, ul.MenuBarHorizontal ul li a:focus { background-color: clear; color: #FFF; } /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */ ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible { background-color: clear; color: #FFF; } /******************************************************************************* SUBMENU INDICATION: styles if there is a submenu under a given menu item *******************************************************************************/ /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal a.MenuBarItemSubmenu { background-image: url(SpryMenuBarDown.gif); background-repeat: no-repeat; background-position: 95% 50%; } /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal ul a.MenuBarItemSubmenu { background-image: url(SpryMenuBarRight.gif); background-repeat: no-repeat; background-position: 95% 50%; } /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal a.MenuBarItemSubmenuHover { background-image: url(SpryMenuBarDownHover.gif); background-repeat: no-repeat; background-position: 95% 50%; } /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover { background-image: url(SpryMenuBarRightHover.gif); background-repeat: no-repeat; background-position: 95% 50%; }
  10. What should the session save path be set to? Currently this is what it is set to, session.save_path = /var/php_sessions Is there anything else that it might be???
  11. Or maybe you guys have a login system that might be a little better than the one I am currently using. I'd be willing to change if it works. EDIT: Sorry....I forgot about the bump rule. Accident..And I can't delete it.
  12. I can't figure out why my login.php does not work with my friends host. Its very simple code and works with my host. It won't work on my buddies website. It just continually redirects me back to the login.php page AGAIN and AGAIN and AGAIN.... HELP ME PLEASE!!! At the top of each web page I put the following code. <?php include 'auth.inc.php'; ?> This is the auth.inc.php file <?php session_start(); if ($_SESSION['logged'] != 1) { $redirect = $_SERVER['PHP_SELF']; header("Refresh: 5; URL=login.php?redirect=$redirect"); echo "Please wait while the server processes your login request......<br>"; echo "(If your browser does not support this, <a href=\"login.php?redirect=$redirect\">click here</a>)"; die(); } ?> This is the login.php file (I hid the username and password, but I have checked that for sure) <?php session_start(); $_SESSION['logged'] = 0; if (isset($_POST['submit'])) { if ($_POST['username'] == "********" && $_POST['password'] == "********") { $_SESSION['logged'] = 1; header ("Refresh: 5; URL=" . $_POST['redirect'] . ""); echo "Please wait while the server processes your login request......<br>"; echo "(If your browser doesn't support this, <a href=\"" . $_POST['redirect']. "\">click here</a>)"; } else { ?> <html> <head> <title>Kayak Wars Captain's Login Page</title> </head> <body> <div align="center"> <div align="center"><img src="http://www.extremecoast.com/Kayak_Wars/layout/header.png" width="1057" height="125"></div> Please Enter your Username and Password (Case Sensitive)<br><br> <form action="login.php" method="post"> <input type="hidden" name="redirect" value="<?php echo $_POST['redirect']; ?>"> <table width="340" border="0"> <tr> <td>Username: </td> <td><input type="text" name="username2"></td> </tr> <tr> <td>Password: </td> <td><input type="password" name="password2"></td> </tr> </table> <br> <input type="submit" name="submit" value="Login"> </form> </div> <?php } } else { ?> <html> <head> <title>Kayak Wars Captain's Login Page</title> </head> <body> <div align="center"> <div align="center"><img src="http://www.extremecoast.com/Kayak_Wars/layout/header.png" width="1057" height="125"></div> Please Enter your Username and Password (Case Sensitive)<br><br> <form action="login.php" method="post"> <input type="hidden" name="redirect" value="<?php echo $_GET['redirect']; ?>"> <table width="340" border="0"> <tr> <td>Username: </td> <td><input type="text" name="username"></td> </tr> <tr> <td>Password: </td> <td><input type="password" name="password"></td> </tr> </table> <br> <br> <input type="submit" name="submit" value="Login"> </form> <?php } ?> </div> </body> </html>
  13. I am having problems with the following script. It only allows me to display images that are ".jpg" format. Sometimes the image might have the extension ".JPG" or ".gif" or ".GIF" or ."png" or ".PNG" How can I change the following script to accept the other file extensions? I tried altering this tiny snippet but I kept getting parse errors. if (preg_match('/\.jpg$/', $file)) { HELP ME PLEASE!!! Thanks. <?php if ($handle = opendir('/home/extremecoast/public_html/Kayak_Wars/Team_Original/uploaded_files/')) { while (false !== ($file = readdir($handle))) { if (preg_match('/\.jpg$/', $file)) { echo "<a href='$file' onclick='return hs.expand(this)' class='highslide'>\n"; echo "<img src='show_image.php?filename=$file&width=100&height=100' alt=''/>\n"; echo "</a>\n"; } } closedir($handle); } ?>
  14. So, I have this contest where when a user catches a fish they enter the size of the fish and this small snippet of code is used to display the data of the largest fish caught. Well, the contest is just starting and the page displays blank data. Is there a way to display the result only when the database is filled with an entry? I would like for it to be blank until an entry is made into the DB. It works great otherwise. $query_trout = "SELECT species_id, team_id, MAX(length) FROM submit WHERE species_id=2 GROUP BY team_id"; $result5 = mysql_query($query_trout) or die(mysql_error()); while($row = mysql_fetch_array($result5)) { $team_id = $row['team_id']; $species_id = $row['species_id']; $trout = $row['MAX(length)']; //get team's name from team table get_team_name($team_id); get_species($species_id); } $trout_bonus .=<<<EOD <tr> <td align='center'>$speciesname</td> <td align='center'>$teamname</td> <td align='center'>$trout"</td> </tr> EOD;
  15. AHAHAHA!! Nevermind. I found my error. I need to review my script before posting. I could have saved precious time!!!!!!!! THANKS TO ALL!!!!!!!
  16. Darn it!! It gave me two entries into the database. The first entry was $now and the second entry was -name.jpg $filename = $now.'-'.$_FILES[$fieldname]['name']; $q = "INSERT INTO image (image_id,filename,date,team_id) VALUES ('NULL','$filename','".date(dMy)."','1')";
  17. Hmmm...I got a syntax error from it. Am I putting the value in correctly? $q = "INSERT INTO image (image_id,filename,date,team_id) VALUES ('NULL','now.'-'.$_FILES[$fieldname]['name']','".date(dMy)."','1')"; $s = mysql_query($q, $conn);
  18. Sounds like an easy fix. I grabbed the upload form code from someone else. I can't find the image name in this code. Its a bit over my head. Can you find the variable that would be the filename only? Would it happen to be this.............. $now.'-'.$_FILES[$fieldname]['name'] <?php // filename: upload.processor.php // first let's set some variables // make a note of the current working directory, relative to root. $directory_self = str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']); // make a note of the directory that will recieve the uploaded files $uploadsDirectory = $_SERVER['DOCUMENT_ROOT'] . $directory_self . 'uploaded_files/'; // make a note of the location of the upload form in case we need it $uploadForm = 'http://' . $_SERVER['HTTP_HOST'] . $directory_self . 'upload.form.php'; // make a note of the location of the success page $uploadSuccess = 'http://' . $_SERVER['HTTP_HOST'] . $directory_self . 'index.php'; // name of the fieldname used for the file in the HTML form $fieldname = 'file'; // Now let's deal with the upload // possible PHP upload errors $errors = array(1 => 'php.ini max file size exceeded', 2 => 'html form max file size exceeded', 3 => 'file upload was only partial', 4 => 'no file was attached'); // check the upload form was actually submitted else print form isset($_POST['submit']) or error('the upload form is neaded', $uploadForm); // check for standard uploading errors ($_FILES[$fieldname]['error'] == 0) or error($errors[$_FILES[$fieldname]['error']], $uploadForm); // check that the file we are working on really was an HTTP upload @is_uploaded_file($_FILES[$fieldname]['tmp_name']) or error('not an HTTP upload', $uploadForm); // validation... since this is an image upload script we // should run a check to make sure the upload is an image @getimagesize($_FILES[$fieldname]['tmp_name']) or error('only image uploads are allowed', $uploadForm); // make a unique filename for the uploaded file and check it is // not taken... if it is keep trying until we find a vacant one $now = time(); while(file_exists($uploadFilename = $uploadsDirectory.$now.'-'.$_FILES[$fieldname]['name'])) { $now++; } // now let's move the file to its final and allocate it with the new filename @move_uploaded_file($_FILES[$fieldname]['tmp_name'], $uploadFilename) or error('receiving directory insuffiecient permission', $uploadForm); // If you got this far, everything has worked and the file has been successfully saved. // We are now going to redirect the client to the success page. header('Location: ' . $uploadSuccess);
  19. Hi again, In my database, (when I upload images through an html form) my URL's to images are stored in the following fashion: /home/ectackle/public_html/images/image-name.jpg Okay, now I am trying to create a page that allows the user to view the image they uploaded. Using the following code, everything works great except the image won't display. When I check the URL to the image it shows this http://www.ectackle.com/home/ectackle/public_html/images/image-name.jpg If I could just get rid of the text in red. I'd be golden. Is there an alternate way to display my image or a way to make the /home/ectackle/public_html/images/image-name.jpg format work to display my image???????? <?php $query_image = "SELECT filename, team_id, MAX(date) FROM image GROUP BY team_id ORDER BY MAX(date)DESC LIMIT 1"; $image_result = mysql_query($query_image) or die(mysql_error()); while($row = mysql_fetch_array($image_result)) { $imagename = $row['filename']; $imagedate = $row['MAX(date)']; $display_image .=<<<EOD <h2><div align="center"><img src="$imagename"></div></h2> EOD; } print $display_image; ?>
  20. I did the same thing as mentioned. I drop all of the images in a folder and then a small snippet of php gets the images. http://www.ectackle.com/uploader/uploaded_files/teampage.php I found this to be helpful. http://www.webdeveloper.com/forum/showthread.php?t=96532 And then I used the Highslide JS to view the images. http://vikjavev.no/highslide/ Then I found a nice thumbnail generator here. http://www.hotscripts.com/ Then searching the forum I found a little snippet of code that will get the images. <?php // Enter the directory for your server in 'your directory' // Be sure to enter the location of your thumbnail generator 'show_image.php?filename=$file&width=100&height=100' if ($handle = opendir('your directory')) { while (false !== ($file = readdir($handle))) { if (preg_match('/\.jpg$/', $file)) { echo "<a href='$file' onclick='return hs.expand(this)' class='highslide'>\n"; echo "<img src='show_image.php?filename=$file&width=100&height=100' alt=''/>\n"; echo "</a>\n"; } } closedir($handle); } ?>
  21. I am having a problem with this script. Is it possible to only allow .jpg or images. It is grabbing my php files too. I think the problem is in this small snippet of code below. example link http://www.ectackle.com/uploader/uploaded_files/teampage.php <?php if ($handle = opendir('/home/ectackle/public_html/uploader/uploaded_files/')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "<a href='$file' onclick='return hs.expand(this)' class='highslide'> <img src='show_image.php?filename=$file&width=100&height=100' alt=''/> </a> "; } } closedir($handle); } ?>
  22. WOO HOO!! I figured it out. Sometimes you just gotta keep hacking the code until you get it right. I had my &width=150&height=150 in the wrong spot. I fixed it by placing it right behind $file YAY! <?php if ($handle = opendir('/home/ectackle/public_html/uploader/uploaded_files/')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo " <a href='$file' onclick='return hs.expand(this)' class='highslide'> <img src='show_image.php?filename=$file&width=150&height=150' alt=''/> </a> "; } } closedir($handle); } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.