Jump to content

ardyandkari

Members
  • Posts

    502
  • Joined

  • Last visited

    Never

Everything posted by ardyandkari

  1. ok... MasterACE14: i tried with one array and got the same error. also, at php.net, it is a lowercase as. PFMaBiSmAd : thank you for that, but i have already been to php.net and know about foreach... you can also do this foreach (array_expression as &$value) got that from php.net too...doesnt help much though... i got it to work...sort of. still doubles the number of days in the calendar...so i am scrapping that idea and will try again later.
  2. hello...i am trying to use the foreach() function to no avail. here is my code: foreach (($arrayfrom as $key1 => $arrfrom) && ($arrayto as $key2 => $arrto)) { if (($count >=($arrfrom)) && ($count <= ($arrto))) {echo "<td bgcolor='#000000'>".$dayArray["mday"]." </td>\n"; $start += ADAY; } i get the following error: what am i doing wrong? i have $arrayfrom and $arrayto defined above as an array()...i tried taking out && ($arrayto as $key2 => $arrto) and it still comes up with the same error...kinda confused :-\ .......
  3. not free... look here for social networking sites that are free... granted, not all are...but, oh well...
  4. if i remember right, there is an image that windows loads to show the main windows loading screen...you could edit that image and have whatever you want... again...that's only if i remember correctly...(i have a brain like swiss cheese)
  5. i think that developer is a jerk... i understand that it is possible to figure out things from looking at the code, but that would take more time (billable time perhaps???) to say that and have the new employee look at the code than just say, "Oh, that makes rabid weasels run across the screen...Cool HUH?" if a question is asked to a senior member and not given a real answer...that senior member should (if nothing else) be reprimanded if not demoted/fired. the reason that companies keep experienced members around is so that new people can learn from them...otherwise they could just get rid of all the better paid employees and hire newbies from college for $10 an hour or something. sorry if i sound harsh, but i have gotten the poopy end of the stick on this issue at a few jobs and it sucks. also, from a purely business standpoint it doesn't make sense. (of course, if the person is asking what an echo() statement does or something basic, i might wonder about how they got into the room with all the bright shiny computer bits)
  6. [quote author=Crayon Violent link=topic=106377.msg970619#msg970619 date=1219294717] I liked the original star wars IX X XI.  I didn't much care for the newer I II III ones.  Those seemed to have catered to a younger audience than the other ones.  I definitely liked LotR better than star wars, however, I have to agree [b]they made the hobbits seem a little bit more homo than in the books[/b], to the point that it was actually annoying.  I love that scene in Clerks 2 when Randal makes fun of the hobbits so much that dude barfed, lol.  The books were definitely way better.  I hear there's a new movie coming out based on the LotR prequel: The Hobbit.  Someone made a cartoon movie of that a long ass time ago.  I thought that was pretty cool.  [/quote] a [i]little[/i] bit?!?!?!?  :-\  definitely agree on StarWars I, II, III...they sucked.  now the original movies rocked and i still watch them...nerdy, yes...but i have embraced my inner nerd, and just roll with it.
  7. How about just saying M*X*1.25? nope doesnt work... just kidding...that's how it came out in my head, so thats what i wrote...
  8. a question slightly off topic but not: is javascript enabled on screen reader browsers (web browsers for the blind)? if not, wouldn't you be turning away those people and putting yourself in the position for a heap of trouble (dont know where you live, but i believe in europe you need to have a "handicap accessible" website)? doesn't seem fair or smart...
  9. you mean this??? other than that, i just find stuff on how fluffy and cute those killing machines are.
  10. ok...i will give you the numbers that i have seen here before: (M * X) + (25%(M * X)) M = hourly rate X = hours building site.
  11. i use mysql date format (yyyy-mm-dd) and then if i want to rearrange the numbers i split it.
  12. <<half bump>> ok...i am just going to roll with the +4 solution unless anyone says anything otherwise... if (($count >=($arrayfrom[0]+4)) && ($count <= ($arrayto[0]+4))) {echo "<td bgcolor='#000000'>".$dayArray["mday"]." </td>\n"; $start += ADAY; } now. i need to know how to get more that just one reservation on the calendar. i tried a while statement and it screwed up the whole calendar... if ($count < $firstDayArray["wday"] || $dayArray["mon"] != $month) { echo "<td> </td>\n"; } else { $x=0; while ($x <= (count($arrayfrom))) { if (($count >=($arrayfrom[$x]+4)) && ($count <= ($arrayto[$x]+4))) {echo "<td bgcolor='#000000'>".$dayArray["mday"]." </td>\n"; $start += ADAY; } else { echo "<td>".$dayArray["mday"]." </td>\n"; $start += ADAY; } $x++; } } } any suggestions yet??? anybody??? **crickets chirp**
  13. i have a wife and daughter who will use the computer sometimes, so i tend to get gummed up once in a while...
  14. i like the first one better. the second one just doesn't click.
  15. cable??? dsl??? dialup??? lets get specific here... if you have cable, they could be doing maintenance on the line. we have cable here and they do something at least once a month to screw up the connection...also, you share bandwidth with your neighbors with cable, so if everyone is doing something at once that eats up a lot of bandwidth, you're stuck. dont know much about dsl...never used it...you dont have to worry about your neighbors with dsl though, because (as far as i know) you dont share bandwidth with neighbors. if you have dialup...stop... also, download a free antivirus and ad-ware remover. i use avg and lavasoft adaware. scan for viruses and adware. that might help...
  16. it sounded like you were going to have the same pages, just subdomains. what you could do is template the page and add your code within that template... i use dreamweaver. that allows easy templating. that would be to only duplicate the look.
  17. awesome site neylitalo! the only issue is there are multiple types of ccl there. make sure you are using the correct licensing (ie. commercial use allowed) otherwise you might get into some trouble! great site though!
  18. not true...just post it in the beta test forum and darkfreaks will tell you any vulnerability that shows up, from sql injection attack vuln, to php.ini problems. just do it <nike swish>
  19. why? are you using us to crack some secret nsa code??? that's it, isn't it? you want us to take the fall for you while you can reap the rewards! well i'm not falling for it! i would pronounce it "10 to 20 in maximum security lockdown".
  20. like has been said before, if you duplicate the content you will get hurt in your rankings or even blacklisted. the content must be different. the people at google aren't stupid. they know that people are going to try to massage everything out of the system that they can... but if you want to try it and find out...go on ahead.
  21. ok...now i am really stuck. i have figured out how to capture the array... now i need help with the script itself. problem code: if ($count < $firstDayArray["wday"] || $dayArray["mon"] != $month) { echo "<td> </td>\n"; } else { if (($count >=($arrayfrom[0])) && ($count <= ($arrayto[0]))) {echo "<td bgcolor='#000000'>".$dayArray["mday"]." </td>\n"; $start += ADAY; } else { echo "<td>".$dayArray["mday"]." </td>\n"; $start += ADAY; } i have the array displayed above the calendar. when looking at the array, it looks like the 23rd through the 30th should be blacked out, but the 19th through the 26th is. 4 days behind. i could have it be : if (($count >=($arrayfrom[0] + 4)) && ($count <= ($arrayto[0] + 4))) but dont know if that would be the correct thing to do... thanks
  22. here is my code now... <?php include "inc/dbconnect.php"; //error_reporting(0); echo "<div align='right'><a href='index.php'>Return To Main Page</a></div>"; define("ADAY", (60*60*24)); if ((!isset($_POST["month"])) || (!isset($_POST["year"]))) { $nowArray = getdate(); $month = $nowArray["mon"]; $year = $nowArray["year"]; } else { $month = $_POST["month"]; $year = $_POST["year"]; } $start = mktime (12, 0, 0, $month, 1, $year); $firstDayArray = getdate($start); ?> <html> <head> <title><?php echo "Calendar: ".$firstDayArray["month"]." ".$firstDayArray["year"]; ?></title> <head> <body> <h1>Select a Month/Year Combination</h1> <form method="post" action="test.php"> <select name="month"> <?php $months = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); for ($x=1; $x <= count($months); $x++) { echo"<option value=\"$x\""; if ($x == $month) { echo " selected"; } echo ">".$months[$x-1]."</option>"; } ?> </select> <select name="year"> <?php for ($x=2008; $x<=2037; $x++) { echo "<option"; if ($x == $year) { echo " selected"; } echo ">$x</option>"; } ?> </select> <select name="site"> <option value="%%" selected>ALL</option> <option value="1">Cabin 1</option> <option value="2">Cabin 2</option> <option value="3">Cabin 3</option> <option value="4">Cabin 4</option> <option value="5">Cabin 5</option> <option value="6">Cabin 6</option> <option value="7">Cabin 7</option> <option value="8">Camp/RV Site 1</option> <option value="9">Camp/RV Site 2</option> <option value="10">Camp/RV Site 3</option> </select> <input type="submit" name="submit" value="Go!"> </form> <br/> <?php //database search $site=(stripslashes(htmlentities(mysql_real_escape_string($_POST['site'])))); if (strlen($month) == 2) { //select date from $sqla="SELECT * FROM reservations WHERE datefrom LIKE '$year-$month-__' AND site LIKE '$site'"; $resulta = mysql_query($sqla) or die(mysql_error()); $numa = mysql_num_rows($resulta); } else { //select date from $sqla="SELECT * FROM reservations WHERE datefrom LIKE '$year-0$month-__' AND site LIKE '$site'"; $resulta = mysql_query($sqla) or die(mysql_error()); $numa = mysql_num_rows($resulta); } if ($numa < 1) { echo "NO RESERVATIONS FOUND"; } else { $i=0; while ($i < $numa) { $datefrom=mysql_result($resulta,$i,"datefrom"); list($yearfrom, $monthfrom, $dayfrom) = split('[/.-]', $datefrom); $datefromarray=array($i => $dayfrom); $dateto=mysql_result($resulta,$i,"dateto"); list($yearto, $monthto, $dayto) = split('[/.-]', $dateto); $datetoarray=array($i => $dayto); $site=mysql_result($resulta,$i,"site"); $i++; } print_r(array_values($datefromarray)); print_r(array_values($datetoarray)); } $days = Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"); echo "<table border=\"1\" cellpadding=\"5\"><tr>\n"; foreach ($days as $day) { echo "<td style=\"background-color: #CCCCCC; text-align: center; width: 14%\"> <strong>$day</strong></td>\n"; } for ($count=0; $count < (6*7); $count++) { $dayArray = getdate($start); if (($count % 7) == 0) { if ($dayArray["mon"] != $month) { break; } else { echo "</tr><tr>\n"; } } if ($count < $firstDayArray["wday"] || $dayArray["mon"] != $month) { echo "<td> </td>\n"; } else { if (($count > ($dayfrom - 1)) && ($count < $dayto)) {echo "<td bgcolor='#000000'>".$dayArray["mday"]." </td>\n"; $start += ADAY; } else { echo "<td>".$dayArray["mday"]." </td>\n"; $start += ADAY; } } } echo "</tr></table>"; ?> </body> </html> i have moved the db queries up above the calendar... i also changed this: if (($count > ($dayfrom - 1)) && ($count < $dayto)) {echo "<td bgcolor='#000000'>".$dayArray["mday"]." </td>\n"; $start += ADAY; } else { echo "<td>".$dayArray["mday"]." </td>\n"; $start += ADAY; } here is a link to the test page: http://www.everkleen.biz/resort/literes/test.php it doesnt get the end date right (always 2 days off), and it only shows one reservation per month... looking at the php.net page for the next() array function i found this: would i have to do something like this to have multiple reservations highlighted??? thanks again.
  23. http://www.simple-upload.com/88 what i would do is have the basic page like you have, but add the option to log in and have your uploads right there... like image shack.
  24. ok...when i first went to the site i kinda did a "Oh goodness" and did honestly want to leave pretty quick...just because of the cartooney nature of the site... could be more professional, thats all that i am saying... now...after sticking around for a little while it started to look nicer. kinda cool, still a little goofy, but neat. not a 10 out of 10, but definately more than a 3...just because i personally wouldnt use it. original, and if you made it yourself i say good job...youre more of an artist than i ever will be.
  25. cant see anything but the login screen...i dont want to make an account...just want to look at the site, log in, etc... make a test login or something.
×
×
  • 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.