Jump to content

butsags

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

About butsags

  • Birthday 06/09/1993

Profile Information

  • Gender
    Not Telling

butsags's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Are you set on using php? I've run into problems a few times while using multiple header() calls and needed a resort. Try javascript. window.location = "http://www.google.com/" you can attach it to a link: <a href="javascript:window.location = 'http://www.google.com/'">Go</a> or add this into the header tag and it will redirect automatically: <script type="text/javascript"> <!-- window.location = "http://www.google.com/" //--> </script> This should be more universal
  2. Thanks man it worked perfectly. I didn't even know that such a thing as modulus exsisted (-__-) i need to go to college Hhaha, Thanks for your help my friend.
  3. Thanks for your reply man, im getting an error on $chunks = int($OrderWeight / 150); I think because int cant be used by itself like that. the error is saying its an undefined function ha. and presuming that that worked, now how would i print out however many chunks of 150 or less there are? something like an array and then a while (($i=0;$i<count($chunkarray);$i++)){echo "".$chunkarray[$i]."";}
  4. Hey guys, So i have a variable that i want to check. I want the script to check if a number is over 150 then break it down into multiple numbers each up to 150. so if the number is 900, there will be six chunks of 150. if the number is say 800, there will be 5 chunks of 150 and one chunk of 50. etc something like: <?php if($OrderWeight > 150){ $OrderWeight = explode("150", '$OrderWeight'); $i=0; while ($i < $OrderWeight) { $OrderWeight[$i]; } } else { } ?> Thanks Guys. I feel like this is a very simple equation, I'm just missing a simple php function
  5. hahahahaha adding overflow-x: hidden; into the body css fixed it. lmao
  6. also on different pcs with different resolutions, there will be space at the bottom and etc.
  7. Hey guys , so here's the problem, My main content in the page shows up but then theres extraneous scrolling to the right that has no content filled with the background color. its weird. heres a screenshot: and heres my css: body { margin: 0; padding: 0; background: #521f07; font-family: sans-serif; font-size: 12px; color: #000000; } .bgclouds{ background: #521f07 url(images/clouds.png) repeat-x left top; } /*Background Content*/ .top { background-image: url('images/top.png'); background-repeat: no-repeat; background-position: top center; } .wrapper { border:0; width:1000px; padding-left:185px; padding-right:185px; background-repeat: repeat-y; background-position:top center; } .footer{ background-image: url('images/footer.png'); background-repeat: no-repeat; background-position: bottom center; padding: 0px 0px 0px 0px; } /*End Background Content*/ .header { position: relative; padding-top: 75px; left: 180px; } .header img{ border:0; } a{ text-decoration: none; color: #4486C7; } a:hover { text-decoration: none; color: #3399FF; } #logo_banner { position: absolute; top: 60px; right: 10px; margin: 0px; } .topmenu { position: relative; height: 30px; padding: 0px; margin: 4px 0; overflow: hidden; } .topmenu li { float: left; list-style: none; } #border{ border-right: 1px solid #484848; } .topmenu li.back { background: url("images/lava.png") no-repeat right -30px; width: 9px; height: 30px; z-index: 8; position: absolute; } .topmenu li.back .left { background: url("images/lava.png") no-repeat top left; height: 30px; margin-right: 9px; /* 7px is the width of the rounded shape */ } .topmenu li a { font: bold 12px arial; text-decoration: none; color: #fff; outline: none; text-align: center; top: 7px; text-transform: uppercase; letter-spacing: 0; z-index: 10; display: block; float: left; height: 30px; position: relative; overflow: hidden; margin: auto 10px; } .topmenu li a:hover{ color:#0033FF; } .topmenu li a:active{ top:8px; } .topmenu li a:focus { top:8px; } #date { position: absolute; top: 48px; margin: 0px; color:#FFFFFF; } h1, h2, h3 { margin: 0; padding: 0; font-weight: normal; color: #FF0000; } h1 { font-size: 2em; font-family: Arial; } h2 { font-size: 2.4em; } h3 { font-size: 1.6em; } .post { margin-bottom: 15px; } .post-bgtop { } .post-bgbtm { } .post .title { height: 38px; border-bottom: 1px solid #E2E2E2; margin-bottom: 10px; padding: 12px 0 0 0px; letter-spacing: -.5px; color: #000000; } .post .title a { color: #32639A; border: none; } .post .meta { margin-bottom: 30px; padding: 5px 0px 15px 0px; text-align: left; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; } .post .meta .date { float: left; } .post .meta .posted { float: right; } .post .meta a { } .post .entry { padding: 0px 0px 20px 0px; padding-bottom: 20px; text-align: justify; } i know for a fact that its something with the .wrapper section because if i change the width of the wrapper to say 800px , most of the brown will go away but the wrapper image is 1000px wide , along with the .top and .footer images. idk ive been trying at it for a while now heres the makeup of the html body: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="squaredancing Square Dancing Paul Ingis PI Squared π2 - PI Squared" /> <meta name="description" content="PI Squared - Square Dance Calling. So why PI Squared? Well, my name is Paul Ingis. PI would be my initials. The squared is for..." /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>π2 - PI Squared</title> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> <script type="text/javascript" src="js/jquery-1.1.3.1.min.js"></script> <script type="text/javascript" src="js/jquery.easing.min.js"></script> <script type="text/javascript" src="js/jquery.lavalamp.min.js"></script> <script type="text/javascript"> $(function() { $("#1, #2, #3").lavaLamp({ fx: "backout", speed: 700, click: function(event, menuItem) { return true; } }); }); </script> </head> <body> <div class="bgclouds"> <table border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td> <div class="top"> <div class="footer"> <!-- header --> <div class="header"> <!-- logo --> <a href="index.php" name="top"> <img src="images/logo.png" /> </a> <img src="images/squarelogo.png" style="padding-left:180px;" /> <div id="logo_banner"> </div> <!-- /logo --> <!-- date --> <p class="smallfont" id="date"> <script language="JavaScript" type="text/javascript"> var days = new Array(; days[1] = "Sunday"; days[2] = "Monday"; days[3] = "Tuesday"; days[4] = "Wednesday"; days[5] = "Thursday"; days[6] = "Friday"; days[7] = "Saturday"; var months = new Array(13); months[1] = "January"; months[2] = "February"; months[3] = "March"; months[4] = "April"; months[5] = "May"; months[6] = "June"; months[7] = "July"; months[8] = "August"; months[9] = "September"; months[10] = "October"; months[11] = "November"; months[12] = "December"; var dateObj = new Date(document.lastModified) var wday = days[dateObj.getDay() + 1] var lmonth = months[dateObj.getMonth() + 1] var date = dateObj.getDate() var fyear =+ dateObj.getFullYear() document.write(wday + ", " + date + " " + lmonth + " " + fyear) </script> </p> <!-- /date --> </div> <!-- navigation --> <table height="30px" border="0" width="745px" align="left" cellpadding="0" cellspacing="0" align="center" style=" padding-left:175px;"> <td> <ul class="topmenu" id="1"> <li><a href="index.php" class="current"><font color="#0033FF">Home</font></a></li> <li><a href="about.php">About</a></li> <li><a href="events.php">Events</a></li> <li><a href="videos.php">Videos</a></li> <li><a href="links.php">Links</a></li> <li><a href="contact.php">Contact</a></li> </ul> </td> </table> <!-- /navigation --> <!-- content table --> <!-- open content container --> <table class="wrapper" cellpadding="0" cellspacing="0" background="images/wrapper.png" > <tr> <td> <div> <div class="post"> <h2 class="title"><a>Square Dance Calling</a></h2> <p class="meta"><span class="date">October 18, 2009</span><span class="posted">Posted by <a>Paul Ingis</a></span></p> <div style="clear: both;"> </div> <div class="entry"> <p><b><big><a>So why PI Squared?</a></big></b> Well, my name is Paul Ingis. <i>PI</i> would be my initials. The "squared" is for Square Dancing. It’s that simple. I figured that out in third grade and have been waiting quite some time to use it. I finally found a way to do it.</p> <p>Square dancing is a relatively newly discovered activity for me. I love the way the rest of the world just melts away when I’m dancing.</p> <p>I took up calling because I wanted to be able to offer a class to Home Schooled families. I’m a Home School dad myself and felt like this would be something I had to offer to the Home School Sub-culture of which I’m a part. </p> <p>Little did I know that I would enjoy the calling so much that I would also want to call to clubs and private parties. Even though I’m a relatively new caller, I’ve had many opportunities to work with both experienced and inexperienced dancers. The feedback has been very positive and encouraging, so I figure, what the heck, I’m going to keep trucking along.</p> <p>If you are interested in having me call a dance or party, please drop me a line either via e-mail or phone.<br>Please visit our <a href="contact.php">Contact</a> page for more information.</p> </div> </div> </div> </td> </tr> </table> <!--footer--> <div> <div style="padding-left:202.5px; padding-top:90px;"> Paul Ingis <br> 201-664-1105 <br> <a href="mailto:[email protected]">Email Me</a> </div> <div align="center" style="padding-top:35px;"> <font color="green"> Copyright © 2009 <a href="http://ingis.com/squaredancing">Paul Ingis</a>. All rights reserved. <br> Layout & Design by <a href="http://ingis.com/squeaky-squash/info.php">Chris Ingis</a>.</p> </font> </div> </div> </div> <!--/footer--> </td> </tr> </table> </div> </div> </body> </html>
  8. hey i figured out the problem. its actualy simply the overflow-x:hidden; part that wasnt allowing the rest of it to flow. i moved the div styles to the stylesheet anyway to clear things up a bit. I dont realy need the overflow-x:hidden; tag because if u use overflow:auto; then it works just as well. thanks problem solved
  9. Hey guys so i have a top menu in js and a calendar in js and for some reason they wont both work at the same time. if i have the calendar and top menu, only the calendar loads but when i take the calendar out, the top menu will work. prob because they both use the same calling functions somewhere? so i was thinking maybe since the javascript for the top menu comes before the calendar, maybe we could divide them in some way? ive already separated it so that the calendar script refs and etc come after the top menu ends and the js references for the top menu are in the header. heres my script : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>p2 - PI Squared</title> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> <script type="text/javascript" src="js/jquery-1.1.3.1.min.js"></script> <script type="text/javascript" src="js/jquery.easing.min.js"></script> <script type="text/javascript" src="js/jquery.lavalamp.min.js"></script> <script type="text/javascript"> $(function() { $("#1, #2, #3").lavaLamp({ fx: "backout", speed: 700, click: function(event, menuItem) { return true; } }); }); </script> </head> <body> <div id="wrapper"> <div id="header"> <div id="logo" width="100%"> <h1><a href="index.php"><img src="images/logo.png" border="0" style="position:relative; bottom:20px;" /></a></h1> <img src="images/squarelogo.png" align="right" style="position:relative; bottom:0px; left:50px;" /> </div> </div> <!-- end #header --> <div> <ul class="topmenu" id="1"> <li><a href="index.php">Home</a></li> <li><a href="links.php">Links</a></li> <li class="current"><a href="contact.php"><font color="#3399FF">Contact</font></a></li> </ul> </div> <!-- end #menu --> <div id="page"> <div id="page-bgtop"> <div id="page-bgbtm"> <div id="content"> <div class="post"> <h2 class="title"><a>Calendar</a></h2> <div style="clear: both;"> </div> <div class="entry"> <script src="js/lib/prototype.js" type="text/javascript"></script> <script src="js/src/scriptaculous.js" type="text/javascript"></script> <script type="text/javascript"> function highlightCalendarCell(element) { $(element).style.border = '1px solid #999999'; } function resetCalendarCell(element) { $(element).style.border = '1px solid #000000'; } function startCalendar(month, year) { new Ajax.Updater('calendarInternal', 'rpc.php', {method: 'post', postBody: 'action=startCalendar&month='+month+'&year='+year+''}); } function showEventForm(day) { $('evtDay').value = day; $('evtMonth').value = $F('ccMonth'); $('evtYear').value = $F('ccYear'); displayEvents(day, $F('ccMonth'), $F('ccYear')); if(Element.visible('addEventForm')) { // do nothing. } else { Element.show('addEventForm'); } } function displayEvents(day, month, year) { new Ajax.Updater('eventList', 'rpc.php', {method: 'post', postBody: 'action=listEvents&&d='+day+'&m='+month+'&y='+year+''}); if(Element.visible('eventList')) { // do nothing, its already visble. } else { setTimeout("Element.show('eventList')", 300); } } function addEvent(day, month, year, body) { if(day && month && year && body) { // alert('Add Event\nDay: '+day+'\nMonth: '+month+'\nYear: '+year+'\nBody: '+body); new Ajax.Request('rpc.php', {method: 'post', postBody: 'action=addEvent&d='+day+'&m='+month+'&y='+year+'&body='+body+'', onSuccess: highlightEvent(day)}); $('evtBody').value = ''; } else { alert('There was an unexpected script error.\nPlease ensure that you have not altered parts of it.'); } // highlightEvent(day); } // addEvent. function highlightEvent(day) { Element.hide('addEventForm'); $('calendarDay_'+day+'').style.background = '#<?= $eventColor ?>'; } function showLoginBox() { Element.show('loginBox'); } function showCP() { Element.show('cpBox'); } function deleteEvent(eid) { confirmation = confirm('Are you sure you wish to delete this event?\n\nOnce the event is deleted, it is gone forever!'); if(confirmation == true) { new Ajax.Request('rpc.php', {method: 'post', postBody: 'action=deleteEvent&eid='+eid+'', onSuccess: Element.hide('event_'+eid+'')}); } else { // Do not delete it!. } } </script> <div id="calendar" class="calendarBox"> <div id="calendarInternal"> </div> <br style="clear: both;"> <span id="LoginMessageBox" style="color: red; margin-top: 10px;"><?= $loginMsg; ?></span> <div id="eventList" style="display: none;"></div> <div style="display: none; margin-top: 10px;" id="addEventForm"> <b>Add Event</b> <br> Date: <input type="text" size="2" id="evtDay" disabled> <input type="text" size="2" id="evtMonth" disabled> <input type="text" size="4" id="evtYear" disabled> <br> <textarea id="evtBody" cols="32" rows="5"></textarea> <br> <input type="button" value="Add Event" onClick="addEvent($F('evtDay'), $F('evtMonth'), $F('evtYear'), $F('evtBody'));"> <a href="#" onClick="Element.hide('addEventForm');">Close</a> </div> <div style="display: none; margin-top: 10px;" id="loginBox"> <b>Login</b> <br> <form action="calendar.php" method="post"> Username: <input type="text" name="username" size="20"> <br> Password: <input type="password" name="password" size="20"> <br> <input type="hidden" name="action" value="login"> <input type="submit" value="Login"> <a href="#" onClick="Element.hide('loginBox');">Close</a> </form> </div> <div style="display: none; margin-top: 10px;" id="cpBox"> <b>Control Panel</b> <a href="#" onClick="Element.hide('cpBox');">Close</a> <br><br> <b>Change the colours</b> <br> <form action="calendar.php" method="post"> Day Colour: <input type="text" name="dayColor" size="6" maxlength="6" value="<?= $dayColor; ?>"> <br> Weekend Colour: <input type="text" name="weekendColor" size="6" maxlength="6" value="<?= $weekendColor; ?>"> <br> Today Colour: <input type="text" name="todayColor" size="6" maxlength="6" value="<?= $todayColor; ?>"> <br> Event Colour: <input type="text" name="eventColor" size="6" maxlength="6" value="<?= $eventColor; ?>"> <br> Iterator 1 Colour: <input type="text" name="iteratorColor1" size="6" maxlength="6" value="<?= $iteratorColor2; ?>"> <br> Iterator 2 Colour: <input type="text" name="iteratorColor2" size="6" maxlength="6" value="<?= $iteratorColor1; ?>"> <br> <input type="hidden" name="action" value="updateColours"> <input type="submit" value="Update Colours"> </form> <br> <form action="calendar.php" method="post"> <input type="hidden" name="action" value="updatePassword"> <b>Change your password</b> <br> New Password: <input type="password" name="password1" size="20"> <br> Confirm it: <input type="password" name="password2" size="20"> <br> <input type="submit" value="Update Password"> </form> <br><br> <b>Logout</b> <form action="calendar.php" method="post"> <input type="hidden" name="action" value="logout"> <input type="submit" value="logout"> </form> </div> </div> <!-- FINAL DIV DO NOT REMOVE --> <script type="text/javascript"> startCalendar(0,0); </script> </div> </div> <div style="clear: both;"> </div> </div> <!-- end #content --> <!-- end #sidebar --> <div style="clear: both;"> </div> </div> </div> </div> <!-- end #page --> </div> <div id="footer"> <p>Paul Ingis <br>201-664-1105 <br><a href="mailto:[email protected]">[email protected]</a> <br>Copyright © 2009 <a href="http://ingis.com/squaredancing">Paul Ingis<a/>. All rights reserved. Design by <a href="http://ingis.com/squeaky-squash/info.php">Chris Ingis</a>.</p> </div> <!-- end #footer --> </body> </html> thanks guys
  10. not a bad idea/ ill look into it. thanks
  11. DBMS= database management system? i am using mysql for the website but mysql doesnt store images but i think i know what you mean. thanks for all your help Solved
  12. yep your right i was missing 1 slash after the directory name haha thank you so much thats a very big help. 1 last thing/ would you happen to know how to make them group into pages of say 15 for example? wouldnt want extraneous images making the page miles long
  13. yeah i would like the overflow to scroll once it reaches over 204 px. i tried it out but it didnt seem to work :/ isnt that weird?
  14. hey thats a great start but when i tried it , it only jumped to teh print function and tells me the amount of images there are in the directory. lol maybe the img src part is wrong? it deffinately sees the correct directory tho in order to tell how many images.
  15. thats a pretty good resource actually. i think i have most of what i need already in the above script. i think i just need a simple script that shoots out however many images are there. something like : if(!empty($images)) { $rand_key = array_rand($images, !); $src = $images[$rand_key]; echo " <a id='thumb1' href='".$src."' class='highslide' onclick='return hs.expand(this)'> <img src='".$src."' align='absmiddle' width='100' height='100' border='2px'></a> </a>"; } would that work? sorry im very new at php
×
×
  • 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.