Jump to content

dsonesuk

Members
  • Posts

    11,220
  • Joined

  • Last visited

  • Days Won

    117

Everything posted by dsonesuk

  1. dsonesuk

    date range

    Because, $monday= setdate, if this day is on Sunday, goes FORWARD 1 day, now you are in Monday, therefore 'this Monday' would target that Monday (next weeks Monday), whereas 'last Monday' brings you back the 'Monday' of the current week you are working to. Hope that makes sense! unless you mean? why not$startDate = $monday->modify("tomorrow");$startDate = $startDate->modify("last Monday");$startDate = $startDate->format('Ymd');$endDate = $sunday->modify("yesterday");$endDate = $endDate->modify("next Sunday");$endDate = $endDate->format('Ymd');instead$startDate = $monday->modify("tomorrow")->modify("last Monday")->format('Ymd');$endDate = $sunday->modify("yesterday")->modify("next Sunday")->format('Ymd');lot shorter
  2. dsonesuk

    Next step?

    Well i just counted your iq + your 1 brain cell that equals 3 doesn't it.
  3. dsonesuk

    Next step?

    Let me say it for you 1, 2, 3 AAAAAAAAAAAAAAAAAAAAAAARRRRRRRRRRRRRRRRGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH.
  4. dsonesuk

    date range

    $newdate = '30-04-2012';//$newdate = '02-05-2012';$now = new DateTime($newdate);$week = $now->format('l') === 'Sunday' ? 'previous' : 'this';$monday = clone $now;$monday->modify('Monday ' . $week . ' week'); /*$now->format('j');$sunday1=clone $now;$sunday1->modify('+7 days'); not required here */$sunday = clone $now;$sunday->modify('Sunday ' . $week . ' week');for ($day = clone $monday; $day <= $sunday; $day->modify('+1 day')) {echo $day->format('Y-m-d').'<br />';}
  5. dsonesuk

    date range

    That works as well, but i gather $sunday1 is to do with another part of code somewhere else?
  6. dsonesuk

    date range

    $now could be tuesday date, wednes.....etc therefore so will $monday, $sunday you have to define the actual monday and sunday values to get the range to loop through <?php$now = new DateTime;//$now->modify("+1 day");//$now->modify("+2 days");//$now->modify("+3 days");//$now->modify("+4 days");//$now->modify("+5 days");//$now->modify("+6 days");//$now->modify("+7 days"); $monday = clone $now;$monday->modify("+1 day")->modify("last Monday"); $sunday = clone $now;$sunday->modify("-1 day")->modify("next Sunday"); for ($day = clone $monday; $day <= $sunday; $day->modify('+1 day')) {echo $day->format('Y-m-d').'<br />';}?> the +1 and -1 days are used if on Monday, the last monday would the Monday week before, by going forward 1 day and selecting last Monday it becomes current last Monday, and then do reverse for Sunday.
  7. dsonesuk

    date range

    You don't need to loop through current weekdays, just identify if current day falls between start - end dates, and apply id to tr element <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><style type="text/css">.mytable td.weekdays {background-color:#FFFF99;}.mytable td.weekend {background-color: #FFCC99;}.mytable #current_week td.weekdays, .mytable #current_week td.weekend {background-color:#FF0033;}</style></head><body><?php$current = new DateTime;$monday = new DateTime;$sunday = new DateTime;$current = $current->format('Ymd'); // change from today to//$current = $current->modify("-1 week")->format('Ymd'); // last week$startDate = $monday->modify("tomorrow")->modify("last Monday")->format('Ymd');$endDate = $sunday->modify("yesterday")->modify("next Sunday")->format('Ymd');echo 'Monday = '.$startDate.'<br />';echo 'Sunday = '.$endDate.'<br />';echo 'current = '.$current.'<br />';?><table class="mytable"><tr><td class="weekdays">23</td><td class="weekdays">24</td><td class="weekdays">25</td><td class="weekdays">26</td><td class="weekdays">27</td><td class="weekend">28</td><td class="weekend">29</td></tr><?phpif($current >= $startDate && $current <= $endDate){echo '<tr id="current_week">';}else{echo '<tr>';}?><td class="weekdays">30</td><td class="weekdays">1</td><td class="weekdays">2</td><td class="weekdays">3</td><td class="weekdays">4</td><td class="weekend">5</td><td class="weekend">6</td></tr></table></body></html>
  8. Using position: absolute; is the problem, it should never, ever! be used for layout where float, margins, padding can be used instead. position: absolute; will position a element to a fixed distance from top, left edge (main problem), which is fine if every screen is a fixed size and resolution, but you are dealing with normal, wide screen, 800 to 1920+ resolutions, so what will look centred in 1024, will not in 1920px. It also is hidden from other element, so other elements can't know its height, width to move out its way, instead they will occupy the empty space it would have occupied.
  9. dsonesuk

    Next step?

    Well! good luck with that!. AS you have taken basically two years to learn simple BASIC php, mysql interaction using forms, and FAILED in understanding ANY OF IT, from w3schools, and this forum. Do you really think that you starting from scratch is really going help! come on who you kidding, just face it you just don't have the mind set to understand any of this to become a web developer/designer, as it goes in one ear and out the other. Just stick with what you can do, teaching English apparently. If there was a book 'php, mysql complete utter idiots' it would still be beyond you. JUST DO US A BIG FAVOUR AND GIVE IT UP.
  10. dsonesuk

    Next step?

    Both! of them.
  11. ?? What do you mean transfer/import 3d model? from 3d application like 'truespace', 'Swift3D', long time since i used these, but they just created a 3d model and you save it as a flash movie, might have changed since then, to use slider rotate etc.OR scan 3d model of plane for example, which sounds expensive, honestly don't know.
  12. What is the html code? you should have if context box width 600px; Note: you have to allow for left right padding and reduce image by these #img_content {width:600px; margin: 0 auto; background-color:#FF0099; text-align:center;}#img_content img {padding:10px 5px;max-width: 590px;max-height: 100%;} <div id="img_content"><img src="../dsonesosprey.jpg" /></div>
  13. Not really locked as such, but you would restrict it reaching the situation where the elements it would start stacking, by applying for a fluid width site a min-width: for the outer container.
  14. If you wish to be taken seriously as a designer/developer of websites, then using a html table for your layout is the wrong way to go. Html tables should only be used as intended, to show rows of data in tabular format. You can lock the html content elements as well, without the use of going backward and using tables, which will be treated as a very amateurish method.
  15. ??? iconbar or iconslist, anyway changed it to iconbar for this, in this situation it would be easier to us jquery to hide the counter when icon hovered over $(document).ready(function(){$("#iconbar").hover(function(){$("#unread_container").hide()},function(){$("#unread_container").show();});}); The other way would be apply position: relative; to li elements then remove the image from anchor link element, and place it beside it so anchor element it is now empty, you then make the anchor links the same size as images, and use position: absolute to place these above the respective image, AND the counter by using a higher z-index,
  16. Give the container position: relative;, with icon background-image, with counter inside overlapping icon, create anchor and make it display: block; position: absolute; top:0; left: 0; right:0; bottom:0;, this will overlap both icon image and counter, but you may have to adjust z-index; to fully overlap.
  17. I think clients would prefer a site that will draw in people and stay, you site garden shed (pitiful visits), other sites Buckingham palace (mega visits), ummmm which would clients prefer?
  18. dsonesuk

    Webcam?

    Have a look for a network ip camera, these can operate through your network to gain access through internet, but you really require a fixed ip address, or you would have to register and setup a account with a company such as www.dyndns.com, where basically they set you up with a domain name address to your camera, which will be checked periodically to see if the dynamic ip address has changed from your ISP, and then update it to your camera domain, I think there was a free version, where you just have to login every 30days or so. There also are wireless ip network cameras, where you only require access to power supply where you place the camera, this obviously requires wireless router.
  19. Right!, because different browser show different borders, and IF you are allowed too, I suggest using cellspacing="1" with a background colour (black for instance) to show between spacing, the problem with this is you have to use, for instance a white background colour for each cell, but the results are consistent in all browsers, but you still end up with double border on bottom and left of five row table.
  20. The only way I can see this being done without the use of css, and with text appearing in blank left hand side of 5 cell rows, is by using two tables, one without borders on left, obviously the other with borders on right. You will!, end up with double borders showing in some browser, you may be able to use 'frame' attribute to help remove non required borders from showing in these browsers. IT is very much harder to achieve a design like this, that will look identical in all browsers, without the use of css.
  21. You don't require two tables, you just need to use border-collapse: and apply/remove borders to cells to achieve the same end result.
  22. Usually you don't lose quality shrinking, its usually the other way round, when you enlarge a small pixel image to a larger size it ends up pixelated and colour blurs from on pixel to the next. All you need to do is get the proportion correct, when he's finished, use high res for scanner while scanning the images, the file size will be huge, but then you just reduce it in size and res to go into you website to the quality you are happy with.
  23. 150px = 3.96875cm is exactly right, what you could do is draw these boxes in a graphics program, print it out and compare.
  24. It searches the whole domain and its sub pages, so you just need the domain name, you type in you keyword, it searches for listing in search engines if found it will show rank IF lower than ranking 200, and then list the url where it was found as inhttp://www.DomainName.com/dsonesuk.html so stop moaning.
  25. A free rank checker, which i use is seobook.com rank checker, you have to register, you enter your domain, then keyword/s and then click start, it then searches through the major search engine google.com, google.co.uk, bing, yahoo etc and list your ranking in each.
×
×
  • Create New...