Jump to content

richiec

Members
  • Posts

    126
  • Joined

  • Last visited

    Never

Everything posted by richiec

  1. Anyone? :'(
  2. Hey all, having a little issue with this script when using IE, everything works fine in firefox but when I open it up in IE there is no text box and the page has the following error Message: Invalid source HTML for this operation. Line: 808 Char: 6 Code: 0 URI: http://fspgeastmidlands.com/index2/scripts/wysiwyg.js Line 808 is textarea.insertAdjacentHTML("afterEnd", editor); Any idea how to get this to work in IE I don't want to have people download firefox to be able to use the website backend pages.
  3. Well I contacted my host support since I couldn't understand why it wasn't working and they pretty much said they don't offer the ability for 3rd party file manager scripts lol, so guess that explains why I was having issues - sigh.
  4. Thanks for the responces! I don't really want to use a direct ftp link with the username and password in it I would rather it be an actual script for a file manager just like the script you posted the link too. I checked the script out and filled out all of the settings, not using the ip either using the actual url of ftp.freehostia.com and I'm still having an issue, it's still saying that it can't connect to ftp.freehostia.com. Is there something in the php.ini file that I would have to change/add to allow a filemanager ftp connection that's the only thing I can think of now with this script saying the same thing.
  5. Hey there, I'm trying to set up a little ftp script to make it easier to upload files and add new folders for images and videos ect on a backend admin page however the following script just will not connect I keep getting the "Couldn't connect to 66.40.52.167" error so it's not even finding the server however when I put it into my browser it connects just fine, I've even pinged it and all works fine so I don't get it. $ftp_server = "66.40.52.167"; $ftp_user = "username"; $ftp_pass = "password"; $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) { echo "Connected as $ftp_user@$ftp_server\n"; } else { echo "Couldn't connect as $ftp_user\n"; } ftp_close($conn_id); Any ideas would be appreciated!
  6. You need to $i++ at the end to then make $i go up by one each time untill it gets to 5 and then it will stop. However since you have another use for $i in the script define it as something else, maybe thats what the $x was but you just didn't change it in the while function. $x=0; //number of instruments (for exemple, 5 instruments) while($x < 5) { if ($dados [cod_curso] == 1) { echo "<a href=\"curso_guitarra.php\"><img src=\"".$dados['image_curso']."\"/><br />".$dados['nome_curso']"</a>"; } $x++; } ?>
  7. echo "<a href=\"curso_guitarra.php\"><img src=\"".$dados['image_curso']."\"/><br />".$dados['nome_curso']"</a>"; Updated, had an error in it.
  8. Hey there, I have an image gallery running on my website right now and I want to give the site admins access to add/delete the images from the different gallery directories. But to be honest I'm totally lost on how to do it lol I know my way around PHP but I've never had to code something to pull up the dir contents with an option to delete the files. I've found scandir which will get the contents of a dir and unlink which deletes a file but I have no clue how to get them to work together, anyone got any ideas or a different function if I'm looking in the wrong direction with those functions. Any help would be much appreciated. Thank you!
  9. Well i have got it working now, i just broke it all down and changed a few things around. This is how i got it working, its not great but it works lol: First of all i split the date and time from the form so one is date the other is time, i also changed the submitted format around to now be submitted as 10-26-09 and 1:35 PM $updatebosstime = $_REQUEST['updatebosstime']; $updatebossdate = $_REQUEST['updatebossdate']; $temp = explode("-",$updatebossdate); $newdate = $temp[2] . "-" . $temp[0] . "-" . $temp[1]; $ts = strtotime("$newdate $updatebosstime") + (60 * 60 * 36); $nt = date("F jS, Y, g:i a", $ts); like i said, its not great and its just temp until i figure out how to get it working the shorter way instead of being so messy but it works for now. Thanks for the help, now i just need to figure out how to work out how long is left until the 36 hours a count down timer kinda thing lol ~Rich
  10. I just tried it on a fresh page with nothing else on it and this is all that was printed back: 02-01-1970 06:59:59 <-- using exactly what you just posted October 26th, 2009, 12:27 pm <-- print $_POST['updatebosstime'];
  11. still does the same thing
  12. Hey all so im building this one page on my site and it requires people to put in a time and then it will save the time and also a time 36 hours after the time which is put in. So basically a time and then 36 hours after that time but i keep traveling back in time lol I have this in my code: //example: October 26th, 2009, 12:00 pm $updatetime = $_POST["updatebosstime"]; //date and time 36 hours after the example $ts = strtotime("$updatetime") + (60 * 60 * 36); $nt = date("F jS, Y, g:i a ", $ts); however its just coming up with January 2nd, 1970, 6:59 am whenever it gets updated, any ideas on how to fix it to display correctly?
  13. Well ive fixed the problem now, it was indeed the motherboard but hey pretty much built a new pc lol only thing which is the same is the processor and case everything else got replaced when i was trying to figure out what it was. But at least it is fixed now. Thanks for the help =) much appreciated Rich
  14. booting it up in normal mode and managing to get to the login screen is very lucky and even if you leave the computer alone it will shut down after at max 5 mins if booted in normal mode, safe mode has never caused the computer to turn off. Today i went and decided to eliminate things, bought new hard drive psu and ram but still does it, which i guess now just leaves the motherboard? Guess ill replace that tomorrow too and see if it fixes the problem.
  15. Before formating i had left it on safe mode over night and when i woke up next morning it was still on and everything was still fine so i knew that the problem wasnt happening when booting in safe mode that it was just when windows was booting normally.
  16. It is very strange indeed because i could boot it up in safe mode and everything would work fine with no resets or anything however if i would try to leave it boot up in normal mode it would shut itself down at random times, first time it would shut down was while it was on the windows xp loading screen with the windows xp logo, sometimes however it would get past that and you would get to the login screen but then shut down and sometimes you could actually login and then it shut down after you have been logged in for a few mins.. Now if it did the same thing for safe mode it wouldnt have been so confusing however like i said in safe mode it would all work fine. So i thought chances are its something to do with the windows installation with safe mode not loading 90% of the drivers ect so chances were that it was a conflicting driver it was just the problem of finding out which one which i didnt have the time for. So after coming to that conclusion i decided to just make sure it wasnt over heating and that it wasnt a problem with the ram which was something else it could be so i checked the heat and that was all fine then i checked the ram and it didnt fix anything so i resorted to just formating the computer and reinstalling windows xp. Everything was going fine untill it got to about 25 mins left on the installation just after the part where you select keyboard layout, computer name, product key ect it just shut itself off again.. So now i know it wasnt anything with windows afterall its something to do with the hardware, any idea what it could be? I have checked the ram its not that and it is not overheating.. any help would be greatly appreciated! Thank you, Rich
  17. Thanks, got it working now =) I did have to add one more thing though before it would work: $datedone = mysql_result($result,$i,"date"); $newd = str_replace(",","",$datedone ); $newdate = date("M jS", strtotime($newd)); I guess because i was no longer using , in the new date it was getting confused. But its working now so thanks again for the help <3
  18. In my DB i have a date layed out like (July 12th, 2009, 6:43 pm) for each entry for when it was done. Its used for a few pages but on one of the pages i need it to be a shorter version of that date but ive hit a road block because now it just echos back Dec 31st 69 this is what i did: $datedone = mysql_result($result,$i,"date"); $newdate = date("M jS y", $datedone); Any idea where im going wrong? Thanks Rich
  19. never mind, thanks anyways for all the help lol i found it <table cellspacing="0" style="border-collapse:collapse; background-repeat: no-repeat;" background="images/background.jpg" align="center">
  20. ive got a table set up which has a background image in it: <table cellspacing="0" style="border-collapse:collapse;" background="images/background.jpg" align="center"> however of course the background image repeats itself after the table goes down far enough.. How can i have it so it doesnt repeat itself? Thanks Rich
  21. After spending about 10 mins to find a decent page which explains how to use the fuction i got it working and it works perfectly!! Thank you very much!!! ~Rich
  22. Not really sure how to explain this so ill try best i can any help would be much appreciated because this is really stressing my head out and its probably something soooo simple ill end up crying myself to sleep! lol anyways... Ok i have a website, a kind of auction site but for a game, members of the site earn points by doing different things on the game and then every week they all get to use the points they have earned and stored up to bid on items that we have won. Ok that side of it all works fine, no problems there however i wanted to make a change currently they can only bid on 2 items at a time (which works fine) it will put there first bid value from DB and then add the new bid and then check to see if they have enough points to cover it.. Works fine but the change i want to make right now is to remove that filter so they can bid on any amount of items that they want. The problem i am having with that is because each bid is its own DB row how can i add up each current bid that that person has to check it against the amount of points they have to spend to see if they have earned enough points to cover all of there bids? Hope you understand that and can help as i said its driving me abit crazy hah ~Rich
  23. richiec

    date

    Hello all, im having a little issue here ill try and explain it best i can. I have a date and time stored in my database which is then read from a site if the date and time in the DB is < than the current date and time (meaning the current date has now passed the date in the DB) the site changes a little. I have it working, it works fine, apart from one thing.. This is the date and time in the DB: May 10, 2009, 15:52 Now today is the 8th and the site is thinking that the current date and time is > than the date and time in the DB because the date begins with 10 (first number being 1) The date field in the DB is using varchar i know to go by number order it would be int and it would then order them correctly however you can only have numbers in int. Does anyone know any way i can solve this issue? Thanks Rich
  24. Still couldnt get it working so opted for a simple check box which they have to tick to confirm lol but thanks for the help all >< ~Rich
  25. Alright as i said before what im trying to do is have a kind of auction set up (which is working fine) however i would like to add a conformation box whenever they bid on an item due to some noobs not paying attention when bidding. Here is the javascript <SCRIPT language="JavaScript"> function go_there() { var where_to = confirm("Only click ok if you are sure its the item you want to bid on!"); if (where_to == true) { window.location = "?confirm=yes"; } else { window.location = "?auctions=view"; } } </SCRIPT> It then calls the function when bidding <form name=\"bid\" method=\"post\" action=\"\" target=\"_self\"> <center><input type=\"text\" name=\"bidnumber\" value=\"$newbid\" size=\"3\" maxlength=\"3\" onKeyPress=\"return numbersonly(this, event)\"> <input type=\"submit\" name=\"auctionbid\" value=\"BID\" onClick=\"go_there()\"><input type=\"hidden\" name=\"auctionid\" value=\"$idid\"></center> </form> Now that form needs to get a few things (if they press ok on the conformation box) for example it needs to get the amount that was bidded and the auctionid If the person presses ok on the conformation box it then does an sql queery to update the things if they press cancel obviously it doesnt.. This is the sql queery for the example if ($_REQUEST["auctionbid"] != NULL){ //// $confirmbid = $_GET['confirm']; if ($confirmbid == "yes"){ $nick = $_SESSION["wishlistusername"]; $bidnumber = $_POST['bidnumber']; $auctionid = $_POST['auctionid']; $query="SELECT * FROM ` blah blah blah.... } else { do nothing since they pressed cancel } I really hope someone can help =\ i know its possible to do i just dont know how to do it correctly...
×
×
  • 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.