Jump to content

damiancds

Members
  • Posts

    131
  • Joined

  • Last visited

Everything posted by damiancds

  1. damiancds

    php includes

    The way I've set up my site is through includes, where I'll have my content page, let's say the home page, index.phpand index.php includes the header.php, sidebar.php, and footer.phpthe thing I'm curious about is that in my header.php is where I've done the doctype and the html, title, head, and starting body tags are, and in my footer is where they're endedshould it be setup that I declare my html, title and whatnot in the content page (index.php) then include header and footer and close them in the content page or is it alright to keep it the way it isI'm thinking I might have to switch them because I'll eventually be doing meta tags and other things and it might be better in the long runany input would be appreciated,thanks
  2. I tried the extra zero, to both and nothing happened.then I added a comma, because I wasn't sure, but that negated it so it wasn't syntactily correct.I even tried adding up to four zero's but that didn't work either.just to see i figured i'd try margin-top: 0; and padding-top: 0; but nothing on those either
  3. It worked perfectly, but not on the top and bottom edges, only on the sides.thanks,
  4. sorry about that ascii thing, I forgot about it not showing spacing,I just found/tried the min-height setting in css and it seemed to work right, though not quite liquid.Is there any downsides to using that, like cross-browser problems and what not.also, I can't seem to figure out how to have my background tile from top to bottom and edge to edge. right now, there's about a 10 pixel white border around all sides.
  5. My setup is this,I have an all div that contains everything, for basically the background outside of the main contentthen a main div, basically the content of the page so it's set to a width of 800 and centered in the pagein the main div, I have a header, sidebar, content, and footer div.both the header and footer are separated into their own includesmy page is set up like this:________________________________| b | Header | b || a |_______________ | a || c | S | | c || k | i | content | k || g | d | | g || r | e | | r || o | | | o || u |____|__________ | u || n | footer | u ||__d___ |_______________ |__d___ |It's a little messy I know, I ###### at ascii art, if you can call this that.but my point, right now my sidebar only goes down to about the 'i' where i'd like it to match the height of the content part.also, I'd like to know how to make it so that everything is stretched to at least the bottom of the page.Another thing, right now, there's a white space all around my page, background and all, how do I get rid of thatif anyone can help me with at least one if these issues, it'd be greatly appreciated, thanks
  6. I honestly can't believed I missed that in the tutorials, but at least when i have another question like this, I'll actually know where to look.thanks,
  7. Now, by navigation trees (don't really know what they're called) I mean what you can see right above this,the:W3Schools Forum > W3Schools > GeneralI'd like to have that working on my site but it seems rather tedious to do it by hand. Is there a way I can parse the path as a string and go from there for something like that or is there something else for it.thanks,
  8. so, i've got a form, and they way i'd like it set up is to be able to combine a first last and surname together for sending through email, but i can't figure out how to. (like $name = $surname + $first + $last)I'd also like to know if it's possible and how to add strings and text together (like $message = $message + "something else")of course there'd likely be spaces between the additions (like $name = $surname + " " + $first + " " + $last), but that's all part of debuggingEDIT: Forgot to mention, but I did look into the php string reference page, and couldn't find anything close enough,thanks,got it. For those of you who need to know, you can add strings together with the dot operator, like so: $first = "bob";$last = "smith";$name = $first.$last; or if you want a space, $name = $first." ".$last;'course I wouldn't have had to post this if I had just taken the time in the first place to do the 2 minute google search. Still, maybe this should be added to the php string reference page.
  9. For the most part I am a pretty competent web designer, if we need something done, I can generally do it, generally.What I need help with is setting up our store front, and doing a periodical newsletter (not sure now if it's weekly or monthly yet).But about the commerce part, there is no way I'm going to take the responsibility if coding that myself (for numerous security reasons, and its complexity)I'm asking about free alternatives, at least decent ones.I've looked into Oscommerce, and Zen cart and they don't seem trustworthy. Allow me to explain, if I went to a site, and they were using either cart system, I would think twice about placing an order.I'd want something more integrated with the rest of our site. We've got like, about us, faqs, recipes, upsides, stuff like that that doesn't really seem to mesh with either cart system. basically, I'd like it so the customer just goes through my site, then they get to the product descriptions, and there's an add to cart button, where they can click on their cart and see what they've added.also, I'd need to know what's required,I have a website built (my own)I have a host,I have shopping cart software (temporarily, zen and oscommerce)I have a payment gatewaywhat else is required, like whats an ssl certificate, and is it required and other stuffSo, the main question here is, what's the best free cart system, that integrates like that, or the best/cheap system (pretty much just a one time fee, not monthly)Actually, scratch that about the newsletter, I'm pretty sure I've decided on how I'm doing it.I'd appreciate any pointers anyone can give me,thanks,
  10. damiancds

    Security Issue

    I forgot to mention earlier, that the code looks like ads (advertising links and whatnot) and when I go to the website, nothing shows up. Could this be because the code was inserted before my php require header.php (where the header.php has the doc type and opening html tags) and after my require footer.php (which has the closing html tags and whatnot)thanks,also, does anyone have/know any fairly easy "stickypots/honeypots", ie traps, so i can tell how the code is getting in and whatnot? Or, any failsafe practices to keeping this stuff secure in the firstplace without shelling out thousands of dollars?much appreciated,
  11. damiancds

    Security Issue

    Well, I've changed my password (I don't even know, it's written down somewhere) and I'm working on going through and deleting the code. Also, for what's installed, I've got zen cart and oscommerce aside from the cpanel.I'll start monitoring it closer now as well, hopefully, the weekly password change will help
  12. damiancds

    Security Issue

    Okay, so after a while of not changing anything on my site (code wise) I went to change it the other day and found this at the top of nearly every page for my site. ...<?php @register_shutdown_function("__sfd1256198085__");function __sfd1256198085__() { global $__sdv1256198085__; if (!empty($__sdv1256198085__)) return; $__sdv1256198085__=1; echo <<<DOC__DOC<!-- [0357296b56fd5c65b7e82ac1abb04107 --><!-- 5808916521 --><div id="block7" style="display:none"><ul><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1481">chloroquine usa and canada</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=2936">order chloroquine overnight without prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1044">anti malarial tablets aralen</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=188">cheap chloroquine no rx</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3507">order cialis soft without prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1755">how to get cialis soft</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=948">buy cialis soft online</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=936">cialis soft usa and canada</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1903">cialis soft tab discount generic</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=443">cialis soft tab</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3650">buying cialis soft online without prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=693">buy cialis soft overnight shipping</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=949">cialis soft drug generic</a></li> ... <li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=2886">online glucophage order</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3540">order glipizide sr cash on delivery</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3983">glucotrol for sale online</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3584">where can i buy glucotrol without a prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=2617">order glipizide sr without prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1886">purchase glucotrol without prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1447">order glucotrol overnight without prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1920">glucotrol xl without a prescription</a></li></ul><a url="java script:document.getElementById('block7').style.display='block';">show</a></div><!-- 0357296b56fd5c65b7e82ac1abb04107] -->DOC__DOC;} ?><?php @register_shutdown_function("__sfd1255552743__");function __sfd1255552743__() { global $__sdv1255552743__; if (!empty($__sdv1255552743__)) return; $__sdv1255552743__=1; echo <<<DOC__DOC<!-- [5f450d6036674811393fc8f4819a24fe --><!-- 3472555521 --><a url="java script:document.getElementById('block86').style.display='block';" title="more"> </a><!-- 5f450d6036674811393fc8f4819a24fe] -->DOC__DOC;} ?><?php @register_shutdown_function("__sfd1254818713__");function __sfd1254818713__() { global $__sdv1254818713__; if (!empty($__sdv1254818713__)) return; $__sdv1254818713__=1; echo <<<DOC__DOC<!-- [c93f87702ce98115cff818490aecc712 --><!-- 3178184521 --><div style="overflow:auto; visibility:hidden; height: 1px; "><ul><li><a href="http://rtbi30h3h34h34.cc/1">.</a></li></ul></div><!-- c93f87702ce98115cff818490aecc712] -->DOC__DOC;} ?><?php require("/home/ledger6/public_html/Resources/Includes/header.php"); ?>... where the only thing that was there originally was my require function for the header.phpNot knowing where it came from, I posted this in the html forums and Ingolme replied stating that it was probably an unguarded php form.now, i have a few throughout my site (all email/contact forms) and I was hoping someone could help in how to guard it.I initially got the code for the form in the w3 tutorial and followed it through and also went with the more secure one discussed later on (for spam I believe).I'm fairly new to php and I'm not really sure how to guard it let alone how the code is being exploited.My form code: <?phpfunction spamcheck($field){//filter_var() sanitizes the e-mail//address using FILTER_SANITIZE_EMAIL$field=filter_var($field, FILTER_SANITIZE_EMAIL);//filter_var() validates the e-mail//address using FILTER_VALIDATE_EMAILif(filter_var($field, FILTER_VALIDATE_EMAIL)){return TRUE;}else{return FALSE;}}if (isset($_REQUEST['email'])){//if "email" is filled out, proceed//check if the email address is invalid$mailcheck = spamcheck($_REQUEST['email']);if ($mailcheck==FALSE){echo "Invalid input";}else{//send email$email = $_REQUEST['email'] ;$subject = $_REQUEST['subject'] ;$message = $_REQUEST['message'] ;mail("an_email@domain.com", "$subject",$message, "From: $email" );echo "Thank you for your submission";}}else{//if "email" is not filled out, display the formecho "<form method='post' action='/Contact/support.php'>Email: <input name='email' type='text' /><br />Subject:<select name='subject'><option value='FAQ Submission'>FAQ Submission</option><option value='Recipe Submission'>Recipe Submission</option></select><br />Message:<br /><textarea name='message' rows='15' cols='40'></textarea><br /><input type='submit' value='Send Message'/></form> If you come up with anything please let me know.thanks,also, the original post should probably be deleted.
  13. as a matter of fact, yes.they're all the same email submission forms.taken from the tutorials here and modified. <?phpfunction spamcheck($field){//filter_var() sanitizes the e-mail//address using FILTER_SANITIZE_EMAIL$field=filter_var($field, FILTER_SANITIZE_EMAIL);//filter_var() validates the e-mail//address using FILTER_VALIDATE_EMAILif(filter_var($field, FILTER_VALIDATE_EMAIL)){return TRUE;}else{return FALSE;}}if (isset($_REQUEST['email'])){//if "email" is filled out, proceed//check if the email address is invalid$mailcheck = spamcheck($_REQUEST['email']);if ($mailcheck==FALSE){echo "Invalid input";}else{//send email$email = $_REQUEST['email'] ;$subject = $_REQUEST['subject'] ;$message = $_REQUEST['message'] ;mail("an_email@domain.com", "$subject",$message, "From: $email" );echo "Thank you for your submission";}}else{//if "email" is not filled out, display the formecho "<form method='post' action='/Contact/support.php'>Email: <input name='email' type='text' /><br />Subject:<select name='subject'><option value='FAQ Submission'>FAQ Submission</option><option value='Recipe Submission'>Recipe Submission</option></select><br />Message:<br /><textarea name='message' rows='15' cols='40'></textarea><br /><input type='submit' value='Send Message'/></form> also, i guess should this be moved to the php area
  14. So, it's been a little bit since I've coded anything for my site and, when I went to add something earlier today, i found that there were additions that I hadn't put there. ...<?php @register_shutdown_function("__sfd1256198085__");function __sfd1256198085__() { global $__sdv1256198085__; if (!empty($__sdv1256198085__)) return; $__sdv1256198085__=1; echo <<<DOC__DOC<!-- [0357296b56fd5c65b7e82ac1abb04107 --><!-- 5808916521 --><div id="block7" style="display:none"><ul><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1481">chloroquine usa and canada</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=2936">order chloroquine overnight without prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1044">anti malarial tablets aralen</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=188">cheap chloroquine no rx</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3507">order cialis soft without prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1755">how to get cialis soft</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=948">buy cialis soft online</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=936">cialis soft usa and canada</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1903">cialis soft tab discount generic</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=443">cialis soft tab</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3650">buying cialis soft online without prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=693">buy cialis soft overnight shipping</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=949">cialis soft drug generic</a></li> ... <li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=2886">online glucophage order</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3540">order glipizide sr cash on delivery</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3983">glucotrol for sale online</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3584">where can i buy glucotrol without a prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=2617">order glipizide sr without prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1886">purchase glucotrol without prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1447">order glucotrol overnight without prescription</a></li><li><a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1920">glucotrol xl without a prescription</a></li></ul><a url="java script:document.getElementById('block7').style.display='block';">show</a></div><!-- 0357296b56fd5c65b7e82ac1abb04107] -->DOC__DOC;} ?><?php @register_shutdown_function("__sfd1255552743__");function __sfd1255552743__() { global $__sdv1255552743__; if (!empty($__sdv1255552743__)) return; $__sdv1255552743__=1; echo <<<DOC__DOC<!-- [5f450d6036674811393fc8f4819a24fe --><!-- 3472555521 --><a url="java script:document.getElementById('block86').style.display='block';" title="more"> </a><!-- 5f450d6036674811393fc8f4819a24fe] -->DOC__DOC;} ?><?php @register_shutdown_function("__sfd1254818713__");function __sfd1254818713__() { global $__sdv1254818713__; if (!empty($__sdv1254818713__)) return; $__sdv1254818713__=1; echo <<<DOC__DOC<!-- [c93f87702ce98115cff818490aecc712 --><!-- 3178184521 --><div style="overflow:auto; visibility:hidden; height: 1px; "><ul><li><a href="http://rtbi30h3h34h34.cc/1">.</a></li></ul></div><!-- c93f87702ce98115cff818490aecc712] -->DOC__DOC;} ?><?php require("/home/ledger6/public_html/Resources/Includes/header.php"); ?>... where the php require ... header.php is where my code actually starts, it seems like somehow, ads were put on my site, yet, when I look at it in firefox, I only see my stuff no ads or anything.from what I can pick out, i see links for astronomy2009 and stuff like cialis / which is in no way related to my siteif it helps I'm hosted with Inmotion hosting, and I'll probably be asking them this as well,also, i'm not sure where this would go, so I just stuck it in the html sectionthanks for any advice or help.
  15. I've got a pure css menu so far, and after I got the css part complete I wanted to add in some javacript to make it easier to navigate.two effects I want to put in are a drop shadow (that'll be last, because it should be the easiest, and the delay I mentioned in the topic titlethe delay will be when the mouse over the top level item, and say after a second, the drop down box pops up. and when they either click or move their mouse off, it will take maybe 2-3 seconds to fade out.I forgot that, i want it to fade in and out.but i figure this will be easier to work on in stepsso first delay in and outthen fadethen dropshadowA demo of the menu i'll be upgrading is herealso, the drop downs are all handled through hovers, like li:hover and whatnotthere's two css (because the menu will be included into another page like it isMain style sheetMenu style sheetthe biggest thing is that i don't really know any javascript (i do know programming code, so I'll likely understand it pretty quick) and don't really know where or how startthanks of any help you can give
  16. wow, I googled and never got that, but thanks, that's got just about everything. I see the opera icon there, but not the Chrome icon(I'm pretty much just looking for icons for the latest versions of the browsers)again, thanks,
  17. okay, never new about middle mouse clicking, but i see that it works, and it fixes that issue.I also never thought to look to add a new tab button, but there it is, so now i'll be using firefox quite a bit more.thanks,
  18. you make it sound like it's bad.but thanks, that was exactly what I was looking to do.I just had to manipulate the borders for seamlessnessIf I can figure out the li width problem.there isn't a way to say "width: auto + 10px;" is there?because that's the simplest way it could be coded and I think it describes what I want.
  19. So I was perusing a site and noticed something that I wouldn't mind implementing on my site.Pretty much everywhere on my site, I've got top links (these are the tree links or name links) where "go back to the top" and when you click it you go back to topI've already got those in my site but what i want is when I clicked it in the other person's site, it animated as if i had used the scroll bar to go back upthe site is webdesignerheaven, so you can look to see what i mean (they're the little up arrows at the end of every title bar thingy like font, stock photography, and so on...I basically want that effect for my site, and I'm pretty sure it's java scriptin fact I went there and used web developer addon and disabled the javascript and they didn't workonly, i want mine to workso i'll have my regular tree anchors and just have the effect in javascript so without it they don't break completelyEDIT:I changed the topic title to reflect more accurately what I'm trying to accomplish
  20. how about adding other browsers like flock, chrome and others,personally i like flockdevelopment wise I'm sticking with firefoxreasons-its portable-addons - web developer * WHAT AN AMAZING TOOL! - fireftp - fire bug - yellowpipe lynx viewer
  21. firefox I feel is the best for developmentthe addons alone sell it-fire ftp-firebug-web developer-yellowpipe lynx viewernot only that but there's a portable version you can pop on a flash drive and go mobile
  22. First off, I figured i would say i'm currently a fan of flock, firefox would have me if it changed three things like flock- an option so the bookmark bar always open in new tabs (if there is an option, I can't find it)- the way the tab bar is handled, flock's bar has a slide for extra tabs, where firefox has a dropdown button- there's no new tab button on the tab bar (very useful, after i got used to it, it got annoying hitting ctrl + t)now for the main reason of this post,does anyone know where i can get a set of browser icons?- i want to have a page on my site that shows which browsers my site works well in- kinda like the icons that w3schools have to show if a tag is supported by a certain browseralso, i found some gorgeous icons but they don't have all the types of browsers i plan to support, and i'd rather have a continuity in the icons rather that 3 gorgeous icons and to regular icons.also, if you feel that is is in the wrong section, kick it our, move it or whateverthanks,
  23. It's the top level bar I'm trying to center,I want to have the gradient background stretch across the page (like it is) (either that or later set it to a fixed width)basically in simplest terms i want the top level items in a div so the div can be centered in the middle of the gradient (but doing so doesn't work)
  24. okay, while perusing the forums, I'll come across a topic that has [solved] in the title,how do you do that, so I don't go bothering people over an already solved topicthanks, and sorry for my stupidity :)Edit: Yay!thanks,
  25. damiancds

    Css Borders

    Sorry for taking so long to reply, but I get annoyed when the original poster doesn't come back with feedback on how it worked out so,It worked,probably wouldn't have caught that so fast,thanks, problem solved
×
×
  • Create New...