Jump to content
xisto Community

sonesay

Members
  • Content Count

    958
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by sonesay

  1. From my experience when people need time away from each other it usually means they need time to think, Do they really want to be with you? I know it sucks but they do deserve their space to think it through. Dont be suprised if they are seen with another person the fact is if they needed space away from you is they arnt 100% sure they want to be with you. They should just be up front and tell you that but maybe they just arnt sure. My previous gf who I was with for 2+ years just said the same thing "I need time away from us". I was ok with giving her space and things seem to carry on as usual but then a few months later I find out shes dating another guy and when I confronted her about it she just said things changed her feelings changed towards me. So I pretty much saw what she ment by needing time away. Needing time away to think if she really wanted to be with me. If i had known there was another guy in the picture I would of left her *bottom* long ago. I dont really like to waste time with people.I dont blame her for leaving me but I just hated the part where she wasnt up front about it. I mean needing time away I didnt know what that really ment. If she wasnt sure or didnt want to be with me she should have just told me. I'm afraid this might be the same thing in your case so be prepared for the worse.One of the first girls I dated back when I was young was a similar situation. we were together but it was only because I never had a gf before and going through puberty so yeah it was an exciting time. I found her attractive but the feeling wasnt there and all we did was make out. Eventually I got sick of it and I just told her straight up I dont want to be with her anymore. When you know you dont love someone you gotta tell them straight up not leave them hanging on its not right. That time I was young I didnt know what love was I guess I did the right thing and not let it go on. She probably hates my guts but probably glad I told her the truth.w/e happens you'll live man people break up all the time after realising thats not the person for them.
  2. umm "Beep" the acid test just give them a link to some newbies site lol. Theres that dark colored one I saw around here I wont name
  3. I dont know too much about pearl well little at all but the idea of being able to merge desktop and www applications is interesting. I personally think the bridge will be closer in the near future. I've seen new articals on this topic before. wouldnt it be great to be able to build applications for both desktop and www use instead of having to build two seperate applications?
  4. sorry bud, I never read things properly so its the ugly white space you want to get rid of? I think its caused by the height attribute height="115" I think if you lower it it may get rid of the white space but I think this method may have another problem since different broswers will render it differently.yeah I jsut noticed under firefox you will see the white box but under safari it will show only the control bars.I guess a more proper way is to remove background off the <embed> tagyou can try <embed style="background:none;" oror <embed style="background:none" I'm not sure whats more correct with a ';' or without. hope that works for you.edit: dosent seem to work I'll keep trying this is a annoying little problem.
  5. ok after hours of serching I find this https://www.daniweb.com/programming/web-development/threads/91092/disable-lock-text-input-form-fields I didnt even know 'readonly' attributes existed. Anyway It seems to work for me so far so if anyone else is looking for the same solution there you go. readonly='readonly'
  6. you definitely need a : in between style="display:none"make sure its like this style="display:none" if that still dont work try style="display:none;" The first seems to work for me on my local server. maybe its just my broswer rendering it incorrectly and allowing any errors to pass. I'll check again
  7. If you have time I would suggest you try a few of them out and see how you like it. Although I'm only fimilar with php at this stage I do want to see what all the fuss is about with ruby on rails but sadly I dont have the time. I'm asumming also it would take you a good few months to get to know each language well enough to understand its capibilites to a high level and apply them in your own work. I'm pretty happy about having so many options available instead of being forced to use just one language. I've seen asp page codes before although I think its too bulky for my liking. What I mean by this is although the functionality seems to be there the code tags required are seem to be large. They are all asp custom tags and having worked on PHP only I didnt really like seeing all those tags in my source. I personally think php gives you abit more control over how you want to build your sites. That being said lol I have not even built any pages in asp, I just have seen a video where a guy shows you how to build a some what complex ajax form with asp and I wasnt too impressed with the amount of asp tags involved. I think it all comes down to your own peference. All these scripting langauages seem to be advanceded enough to give you the functions you need. its just different in how you are able to use them. I hope that makes some sense :Plike I said give them a try if you have time and happy programming.
  8. I checked out your code on your site <embed width="150" height="115" align="middle" loop="true" autostart="true" src="Music/Stille Nacht.mp3" style=""/> style has no value thats probably why. worse case i think if you assign values of 0 to height and width it will hide it lol. or else you can always try assigned the style attribute to the div tag I'm sure it can work there also. if that still dosent work you can always move that div -100 px out of the screen or something.
  9. I dont get it the link is targeted to msn.com . what do you mean by this? is it a joke or something?
  10. that code did hide the player on my test. can i see a link to your page?
  11. this should work <div align="center"><embed style="display:none" src="Music/Stille Nacht.mp3" width=150 height=115 autostart=true align="center" loop="true"></div>
  12. My working example is here http://forums.xisto.com/no_longer_exists/ The form submits to itself and stores what ever the user inputs into session variables. Thats all fine and I have validation checks for it, I wanted to add more and I remember comming across a site where they would lock from fields to prevent any changes if the information was already supplied and validated. I'm looking to build something similar but cant seem to figure out how to get that same effect at this time. Heres my program logic so far application.php includes('application_content.php'); inside application_content i have my form. The form submits to itself checking validation and displaying 3 stages of the form (so far.. more to be added) stage 0 - blank form, user just visited first time so display empty form stage 1 - checks for post count if user submited form then run validations. if there are errors display errors and present same form for them to correct stage 2 - no errors from pervious stage, just display the store session vars Now the input field I'm interested in and particular concerned about is the date of birth field. Here I would rather the user use the javascript calender to pick a date then enter it manually. I hope this would eliminate any potiential errors like types or incorrect format. I mean this will save me doing validations . Well one method I used was to make it read only. I've tried making it read only from different stages e.g 0,1,2 of the form but once posted it somehow loses storage from the session its suppose to be assigned to. This is what is confusing me as you can see on stage 1 of the form when there are no errors I lock the fields as read only for the other input fields and when it gets submitted to stage 2 for display purposes it does get saved in the session. Any ideas of how to go about this task would be much appreciated ^^. heres my program logic for the form 'application_content.php' $user_ck_result = mysql_query($user_ck_query, $link); $ck_result = "Default"; $pattern = "/[!|@|#|$|%|^|&|*|(|)|_|\-|=|+|\||,|.|\/|;| linenums:0'><?php/*Description------------File contains an application form for users to registerContents----------1. Functions2. Application Form // Part 1 2.1 Display Empty form 2.2 Check and Dsiplay form with any ERRORS if any 2.2.1 display form with errors 2.2.2 display from with no errors // Part 2 2.3 display details from part 1 (just for display pruposes making sure details are stored.)*/session_start();$sid = session_id();// 1. FUNCTIONSfunction ck_app_username($uname) { include("db.php"); // check if user already exisit $user_ck_query = "SELECT u_name FROM user WHERE u_name ='" . $uname . "'"; $user_ck_result = mysql_query($user_ck_query, $link); $ck_result = "Default"; $pattern = "/[!|@|#|$|%|^|&|*|(|)|_|\-|=|+|\||,|.|\/|;|:|\'|\"|\[|\]|\{|\}]/i"; // check for input if($uname == '') { $ck_result = "<span class='error_header'>Required!</span>"; $app_errors['username'] = true; } else if (preg_match($pattern, $uname)) { $ck_result = "<span class='error_header'>illegal characters</span>"; $app_errors['username'] = true; } else if (preg_match("/[0-9]/", $uname)) { $ck_result = "<span class='error_header'>No numbers in username!</span>"; $app_errors['username'] = true; } else if (strlen($uname) < 3) { $ck_result = "<span class='error_header'>3 Characters minimun!</span>"; $app_errors['username'] = true; } else if (mysql_num_rows($user_ck_result) > 0) { $ck_result = "<span class='error_header'>User Exist!</span>"; $app_errors['username'] = true; } else { $ck_result = "<span class='ok_header'>Available</span>"; unset($app_errors['username']); } return $ck_result;}function ck_app_password($pwd,$cpwd) {// version 1.0 $app_password_result = "default"; // check password if($pwd == '' || $cpwd == '') { $app_password_result = "<span class='error_header'>Enter password and confirm!</span>"; $app_errors['password'] = true; } // user submitted something else if ($pwd != $cpwd) { $app_password_result = "<span class='error_header'>Passwords do not match!</span>"; $app_errors['password'] = true; } // check for minimun chars for password 6 else if (strlen($pwd) < 6) { $app_password_result = "<span class='error_header'>Passwords must be 6 characters or more!</span>"; $app_errors['password'] = true; } // all checks done password ok else { $app_password_result = "<span class='ok_header'>OK!</span>"; unset($app_errors['password']); } // return result return $app_password_result;}function ck_name($name) { $ck_name_result = 'Default'; $regex = "/[^a-zA-Z]/"; if($name == '') { $ck_name_result = "<span class='error_header'>Required!</span>"; $app_errors['name'] = true; } else if(preg_match($regex,$name)) { $ck_name_result = "<span class='error_header'>Error. a-z A-Z only!</span>"; $app_errors['name'] = true; } else { $ck_name_result = "<span class='ok_header'>OK</span>"; unset($app_errors['name']); } return $ck_name_result;}function ck_email ($mail) { //default $ck_email_result = "Default"; //pattern $regex = '/\A(?:[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+' .'(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@' .'(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[a-z]{2}|' .'com|org|net|gov|biz|info|name|aero|biz|info|jobs|' .'museum)\\Z/i'; if ($mail == '') { $ck_email_result = "<span class='error_header'>Email Required!</span>"; $app_errors['email'] = true; } else if (preg_match($regex, $mail)) { $ck_email_result = "<span class='ok_header'>OK!</span>"; $app_errors['email'] = true; } else { $ck_email_result = "<span class='error_header'>Invalid Emai!</span>"; unset($app_errors['email']); } return $ck_email_result;} // END FUNCTIONS =======// 2. APPLICATION FORM ============================================================================================ // 2.1 DISPLAY EMPTY FORMif(count($p) == 0) {echo " <h1>Personal Details - Part 1 of 5</h1> <p> Fill in all the details below and any additional information you like. All yellow fieldds are requiured, Please make sure you have read and understood the rules before posting an application. </p> <p> Displaying pages for the first time. S ID = $sid </p> <form name=\"app_form\" method=\"post\" action=\"application.php\"> <input type=\"hidden\" name=\"app_stage\" value=\"1\" /> <ul class=\"app_details\"> <li class=\"col1\">Desired Username</li> <li><input type=\"text\" name=\"app_username\" /></li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Password</li> <li><input type=\"password\" name=\"app_password\" /></li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Comfirm Password</li> <li><input type=\"password\" name=\"app_cpassword\" /></li> </ul> <ul class=\"app_details\"> <li class=\"col1\">First Name</li> <li><input type=\"text\" name=\"app_fname\" /></li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Last Name</li> <li> <input type=\"text\" name=\"app_lname\" /></li> </ul> <script language='javascript' type='text/javascript'> $(function() { $('.date-pick').datePicker({startDate:'01/01/1950'}); }); </script> <ul class=\"app_details\"> <li class=\"col1\">DOB</li> <li><input type=\"text\" size=\"10\" name=\"app_dob\" class='date-pick' value='01/01/1990' disabled='readonly' /></li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Gender</li> <li> <select name=\"app_gender\" /> <option value=\"m\">Male</option> <option value=\"f\">female</option> </select> </li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Email</li> <li> <input type=\"text\" name=\"app_email\" /> $email_result</li> </ul> <ul class=\"app_details\"> <li class=\"col1\"></li> <li><button>Next</button></li> </ul> </form> ";}// 2.2 Display form with any errors ============================================else if(count($p) > 0 && $p['app_stage'] < 2 ){ $s = $_SESSION; $app_username = strtolower($p['app_username']); $_SESSION['app_username'] = htmlspecialchars($app_username); $_SESSION['app_password'] = $p['app_password']; $_SESSION['app_cpassword'] = $p['app_cpassword']; $_SESSION['app_fname'] = $p['app_fname']; $_SESSION['app_lname'] = $p['app_lname']; $_SESSION['app_gender'] = $p['app_gender']; $_SESSION['app_dob'] = $p['app_dob']; $_SESSION['app_email'] = $p['app_email']; if ($p['app_stage'] == 1) { // check results if(!isset($s['app_errors'])) { $s['app_errors'] = array(); } $app_errors = $s['app_errors']; //username $username_result = ck_app_username($s['app_username']); if($username_result == "<span class='ok_header'>Available</span>") { unset($app_errors['username']); } else{ $app_errors['username'] = true; } //password $password_result = ck_app_password($s['app_password'],$s['app_cpassword']); if($password_result == "<span class='ok_header'>OK!</span>") { unset($app_errors['password']); } else{ $app_errors['password'] = true; } // names $fname_result = ck_name($s['app_fname']); $lname_result = ck_name($s['app_lname']); //email $email_result = ck_email($s['app_email']); if($email_result == "<span class='ok_header'>OK!</span>") { unset($app_errors['email']); } else{ $app_errors['email'] = true; } // 2.2.1 ECHO application with ERRORs ========================================== if(count($app_errors) > 0) { echo " <h1>Personal Details - Part 1 of 5</h1> <p> There are Errors please correct and resubmit. </p> <form name=\"app_form\" method=\"post\" action=\"application.php\"> <input type=\"hidden\" name=\"app_stage\" value=\"1\" /> <ul class=\"app_details\"> <li class=\"col1\">Desired Username</li> <li><input type=\"text\" name=\"app_username\" value=\"{$s['app_username']}\" /> $username_result</li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Password</li> <li><input type=\"password\" name=\"app_password\" value=\"{$s['app_password']}\" /></li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Comfirm Password</li> <li><input type=\"password\" name=\"app_cpassword\" value=\"{$s['app_cpassword']}\" /> $password_result</li> </ul> <ul class=\"app_details\"> <li class=\"col1\">First Name</li> <li><input type=\"text\" name=\"app_fname\" value=\"{$s['app_fname']}\" /> $fname_result</li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Last Name</li> <li> <input type=\"text\" name=\"app_lname\" value=\"{$s['app_lname']}\" /> $lname_result</li> </ul> <script language='javascript' type='text/javascript'> $(function() { $('.date-pick').datePicker({startDate:'01/01/1950'}); }); </script> <ul class=\"app_details\"> <li class=\"col1\">DOB</li> <li><input type=\"text\" size=\"10\" name=\"app_dob\" value=\"{$s['app_dob']}\" class='date-pick' disabled='readonly' /> </li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Gender</li> <li> <select name=\"app_gender\" /> "; // check if gender selected if($p['app_gender'] == 'f') { echo "<option value=\"f\">female</option> <option value=\"m\">Male</option> "; } else { echo "<option value=\"m\">Male</option> <option value=\"f\">female</option> "; } echo " </select> </li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Email</li> <li> <input type=\"text\" name=\"app_email\" value=\"{$s['app_email']}\" /> $email_result </li> </ul> <ul class=\"app_details\"> <li class=\"col1\"></li> <li> "; // check for any errors before displaying buttons if(count($app_errors) > 0) { echo "<button>Re-submit</button>"; } else { echo "<button>Submit</button> "; } echo " </li> </ul> </form> "; } // 2.2.2 ECHO application form with 0 ERRORS ========================================== else { echo " <h1>Personal Details - Part 1 of 5</h1> <p> Please confirm details and submit, If there are any changed needed to be made hit the back button now. </p> <form name=\"app_form\" method=\"post\" action=\"application.php\"> <input type=\"hidden\" name=\"app_stage\" value=\"2\" /> <ul class=\"app_details\"> <li class=\"col1\">Desired Username</li> <li><input type=\"text\" name=\"app_username\" value=\"{$s['app_username']}\" disabled='readonly' /> $username_result</li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Password</li> <li><input type=\"password\" name=\"app_password\" value=\"{$s['app_password']}\" disabled='readonly' /></li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Comfirm Password</li> <li><input type=\"password\" name=\"app_cpassword\" value=\"{$s['app_cpassword']}\" disabled='readonly' /> $password_result</li> </ul> <ul class=\"app_details\"> <li class=\"col1\">First Name</li> <li><input type=\"text\" name=\"app_fname\" value=\"{$s['app_fname']}\" disabled='readonly' /> $fname_result</li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Last Name</li> <li> <input type=\"text\" name=\"app_lname\" value=\"{$s['app_lname']}\" disabled='readonly' /> $lname_result</li> </ul> <script language='javascript' type='text/javascript'> $(function() { $('.date-pick').datePicker({startDate:'01/01/1950'}); }); </script> <ul class=\"app_details\"> <li class=\"col1\">DOB</li> <li><input type=\"text\" size=\"10\" name=\"app_dob\" value=\"{$s['app_dob']}\" class='date-pick' disabled='disabled' /> </li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Gender</li> <li> <select name=\"app_gender\" disabled='readonly'/> "; // check if gender selected if($p['app_gender'] == 'f') { echo "<option value=\"f\" >female</option> <option value=\"m\">Male</option> "; } else { echo "<option value=\"m\" >Male</option> <option value=\"f\">female</option> "; } echo " </select> </li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Email</li> <li> <input type=\"text\" name=\"app_email\" value=\"{$s['app_email']}\" disabled='readonly' /> $email_result </li> </ul> <ul class=\"app_details\"> <li class=\"col1\"></li> <li> "; // check for any errors before displaying buttons if(count($app_errors) > 0) { echo "<button>Re-submit</button>"; } else { echo "<button>Submit</button> "; } echo " </li> </ul> </form> "; } } }// 2.3 Display stored details from part 1else if (count($p) > 0 && $p['app_stage'] == 2) { $post_count = count($p); echo " <h1>Personal Details - Part 2 of 5</h1> <p> Part 2 </p> <form name=\"app_form\" method=\"post\" action=\"application.php\"> <input type=\"hidden\" name=\"app_stage\" value=\"2\" /> <ul class=\"app_details\"> <li class=\"col1\">Desired Username</li> <li><input type=\"text\" name=\"app_username\" value=\"{$s['app_username']}\" /> $username_result</li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Password</li> <li><input type=\"password\" name=\"app_password\" value=\"{$s['app_password']}\" /></li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Comfirm Password</li> <li><input type=\"password\" name=\"app_cpassword\" value=\"{$s['app_cpassword']}\" /> $password_result</li> </ul> <ul class=\"app_details\"> <li class=\"col1\">First Name</li> <li><input type=\"text\" name=\"app_fname\" value=\"{$s['app_fname']}\" /> $fname_result</li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Last Name</li> <li> <input type=\"text\" name=\"app_lname\" value=\"{$s['app_lname']}\" /> $lname_result</li> </ul> <script language='javascript' type='text/javascript'> $(function() { $('.date-pick').datePicker({startDate:'01/01/1950'}); }); </script> <ul class=\"app_details\"> <li class=\"col1\">DOB</li> <li><input type=\"text\" size=\"10\" name=\"app_dob\" value=\"{$s['app_dob']}\" class='date-pick' /> </li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Gender</li> <li> <select name=\"app_gender\" /> "; // check if gender selected if($p['app_gender'] == 'f') { echo "<option value=\"f\">female</option> <option value=\"m\">Male</option> "; } else { echo "<option value=\"m\">Male</option> <option value=\"f\">female</option> "; } echo " </select> </li> </ul> <ul class=\"app_details\"> <li class=\"col1\">Email</li> <li> <input type=\"text\" name=\"app_email\" value=\"{$s['app_email']}\" /> $email_result </li> </ul> <ul class=\"app_details\"> <li class=\"col1\"></li> <li><button>Submit</button></li> </ul> </form> "; }?>
  13. that 1 header, plus horizontal navigation, plus 2 column is pretty generic and I'm sure you can find one easy from these 2 links http://ww38.code-sucks.com/css%20layouts/fith-css-layouts/ http://ww38.code-sucks.com/css%20layouts/faux-css-layouts/ I'm using one from here also. If you build your site off any of these layouts your site layout shouldnt break as easy. They are reasonibly plain yet you can still add on it easy enough. Once you start adding alot of content in your code can get messy fast so finding errors to correct can be difficult. Dont worry too much you do what most people do, just paste a whole lot of code in there. But the proper way is to start from scratch and correct any mistakes before adding more things in. Heres how i would do it and suggest you do it 1. pick a template you like, download it and load it on your computer 2. change any colors / fonts / margins in the css file (You can always modify later if needed or if you change your mind) 3. add navigation in there and test it out. 4. add your ajax functions and any other javascript and test it out 5. load your lightbox gallery in. you should check for any errors during each stage/when you add new things in. I hope this helps abit if you dont understand fully dont worry not everyone does. I still get confused my self about what CSS is actually doing. The only way you will pick it up is if you keep learning. I've only started working with CSS myself and javascript in the last 4 months on and off of course. I've done javascript before a few years back but I dont remember lol so that dont count. Any way you get the points keep at it. As a last resort if you really need to get a move on building your site which is understandable and get a solid layout builted to use instead of building one from scratch I can help. it shouldnt take too long, on the other hand if you want to build it your self and try and learn along the way thats cool too.
  14. Want some plain CSS layouts you can learn from and customize? I found this awsome site which has many CSS layouts that include minimal code and they are free to use. These are great because you can learn how its layed out with CSS and HTML divs because the code is very small. That way you will probably understand more when building your site instead of being confused because theres so much code. http://ww38.code-sucks.com/css%20layouts/
  15. yeah it does break under fire fox if you view the picture from home.htm but if you load it by it self on photo.html it works fine under fire fox. I think its because of the CSS files. There is probably some conflicts between myCSS.css and lightbox.css so I guess one way would be to start going through them and removing any duplicates on the myCSS.css side.I know its kinda messy lol i've looked through it and didnt even want to touch them but if you wanna keep this layout and want to fix it I guess it has to be done. Atleast you know it works or should work.by the way it works fine under safari also, just firefox messes up, Are you still going to keep building with this layout? I'm sure you can find a similar already built CSS layout which might event not have any break problems. I found a good site for layouts before but cant seem to find the link anymore.
  16. that function just got one line added to it. heres a copy I have if you just want to copy and paste that. Its got the second copy of ajax functions removed. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/ type="text/javascript">/************************************************ Dynamic Ajax Content- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com/)* This notice MUST stay intact for legal use* Visit Dynamic Drive at [url="http://www.dynamicdrive.com/"]http://www.dynamicdrive.com/; for full source code***********************************************/var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)var loadedobjects=""var rootdomain="http://"+window.location.hostnamevar bustcacheparameter=""function ajaxpage(url, containerid){var page_request = falseif (window.XMLHttpRequest) // if Mozilla, Safari etcpage_request = new XMLHttpRequest()else if (window.ActiveXObject){ // if IEtry {page_request = new ActiveXObject("Msxml2.XMLHTTP")} catch (e){try{page_request = new ActiveXObject("Microsoft.XMLHTTP")}catch (e){}}}elsereturn falsepage_request.onreadystatechange=function(){loadpage(page_request, containerid)}if (bustcachevar) //if bust caching of external pagebustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()page_request.open('GET', url+bustcacheparameter, true)page_request.send(null)}function loadpage(page_request, containerid){if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))document.getElementById(containerid).innerHTML=page_request.responseText;Lightbox.prototype.initialize();}function loadobjs(){if (!document.getElementById)returnfor (i=0; i<arguments.length; i++){var file=arguments[i]var fileref=""if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceedingif (file.indexOf(".js")!=-1){ //If object is a js filefileref=document.createElement('script')fileref.setAttribute("type","text/javascript");fileref.setAttribute("src", file);}else if (file.indexOf(".css")!=-1){ //If object is a css filefileref=document.createElement("link")fileref.setAttribute("rel", "stylesheet");fileref.setAttribute("type", "text/css");fileref.setAttribute("href", file);}}if (fileref!=""){document.getElementsByTagName("head").item(0).appendChild(fileref)loadedobjects+=file+" " //Remember this object as being already added to page}}}</script><style type="text/css">#dropmenudiv{position:absolute;border:0px solid black;border-bottom-width: 0;font:normal 12px Verdana;line-height:18px;z-index:100;}#dropmenudiv a{width: 100%;display: block;text-indent: 3px;border-bottom: 0px solid black;padding: 1px 0;text-decoration: none;font-weight: bold;color: black;}#dropmenudiv a:hover{ /*hover background color*/background-color: #ffccff;color: white;}</style><script type="text/javascript">/************************************************ AnyLink Drop Down Menu- © Dynamic Drive (http://www.dynamicdrive.com/)* This notice MUST stay intact for legal use* Visit [url="http://www.dynamicdrive.com/"]http://www.dynamicdrive.com/; for full source code***********************************************///Contents for menu 1var menu1=new Array()menu1[0]='<a href="java script:ajaxpage(\'photo.html\',\'content\');">Modelling Album</a>';menu1[1]='<a href="java script:ajaxpage(\'photo.html\',\'content\');">My Photos</a>';menu1[2]='<a href="java script:ajaxpage(\'multimedia.html\',\'content\');">Multimedia Portfolio</a>'; var menuwidth='165px' //default menu widthvar menubgcolor='lightyellow' //menu bgcolorvar disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)var hidemenu_onclick="yes" //hide menu when user clicks within menu?/////No further editting neededvar ie4=document.allvar ns6=document.getElementById&&!document.allif (ie4||ns6)document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')function getposOffset(what, offsettype){var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;var parentEl=what.offsetParent;while (parentEl!=null){totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;parentEl=parentEl.offsetParent;}return totaloffset;}function showhide(obj, e, visible, hidden, menuwidth){if (ie4||ns6)dropmenuobj.style.left=dropmenuobj.style.top="-500px"if (menuwidth!=""){dropmenuobj.widthobj=dropmenuobj.styledropmenuobj.widthobj.width=menuwidth}if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")obj.visibility=visibleelse if (e.type=="click")obj.visibility=hidden}function iecompattest(){return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body}function clearbrowseredge(obj, whichedge){var edgeoffset=0if (whichedge=="rightedge"){var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15dropmenuobj.contentmeasure=dropmenuobj.offsetWidthif (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth}else{var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffsetvar windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18dropmenuobj.contentmeasure=dropmenuobj.offsetHeightif (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeightif ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge}}return edgeoffset}function populatemenu(what){if (ie4||ns6)dropmenuobj.innerHTML=what.join("")}function dropdownmenu(obj, e, menucontents, menuwidth){if (window.event) event.cancelBubble=trueelse if (e.stopPropagation) e.stopPropagation()clearhidemenu()dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudivpopulatemenu(menucontents)if (ie4||ns6){showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)dropmenuobj.x=getposOffset(obj, "left")dropmenuobj.y=getposOffset(obj, "top")dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"}return clickreturnvalue()}function clickreturnvalue(){if (ie4||ns6) return falseelse return true}function contains_ns6(a, {while (b.parentNode)if ((b = b.parentNode) == a)return true;return false;}function dynamichide(e){if (ie4&&!dropmenuobj.contains(e.toElement))delayhidemenu()else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))delayhidemenu()}function hidemenu(e){if (typeof dropmenuobj!="undefined"){if (ie4||ns6)dropmenuobj.style.visibility="hidden"}}function delayhidemenu(){if (ie4||ns6)delayhide=setTimeout("hidemenu()",disappeardelay)}function clearhidemenu(){if (typeof delayhide!="undefined")clearTimeout(delayhide)}if (hidemenu_onclick=="yes")document.onclick=hidemenu</script><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Keego Nguyen's Official Site</title><link rel="stylesheet" href="myCSS.css" type="text/css" media="screen" /><link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /><script src="js/prototype.js" type="text/javascript"></script><script src="js/scriptaculous.js?load=effects" type="text/javascript"></script><script src="js/lightbox.js" type="text/javascript"></script><style type="text/css"><!--body { background-color: #CCCCCC; background-image: url();}.style1 {color: #CCCCCC}#Layer1 { position:absolute; width:200px; height:115px; z-index:1;}--></style></head><body><div align="center"><div id="banner"> <img src="banner.jpg" alt="http://forums.xisto.com/no_longer_exists/; width="750" height="210" /></div> <div class="myCSS" id="navb script:ajaxpage('photo.html','content');">Photo</a> | <a href="java script:ajaxpage('biography.html','content');">Biography</a> | <a href="gallery.htm" class="style1" onclick="return clickreturnvalue()" onmouseover="dropdownmenu(this, event, menu1, '150px')" onmouseout="delayhidemenu()">Gallery</a> | <a href="guesstbook.htm">Guestbook</a></div><div class="myCSS" id="main"> <div id="content" align="left">Info goes here</div> <div class="myCSS" id="rightcontent">Content for id "rightcontent" Goes Here</div> <div align="right"></div></div><p> </p><p> </p><p> </p></body></html> The original was just like this function loadpage(page_request, containerid){if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))document.getElementById(containerid).innerHTML=page_request.responseText;} I just added 'Lightbox.prototype.initialize();' to it function loadpage(page_request, containerid){if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))document.getElementById(containerid).innerHTML=page_request.responseText;Lightbox.prototype.initialize();}
  17. Go to http://www.apple.com/ its on the front page. lol I cracked up to it.
  18. Yeah I tend not to beiieve this kind of thing. I see the adds on tv telling me to call them up and find out about things for only 5 dollars a min lol yeah right. I'm not that gullible but you would be amazed how many people actually believe in this and do call. They must make alot of money since there are so many people in this world who do believe in these kind of things. Whats even more crazy is there are people who are buying land on the moon for real money beleiveing they own it now lol.
  19. Just add this thse two items to your home.htm page1 <title>Keego Nguyen's Official Site</title><link rel="stylesheet" href="myCSS.css" type="text/css" media="screen" /><link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> style sheet link for your lightbox.css file.2 function loadpage(page_request, containerid){if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))document.getElementById(containerid).innerHTML=page_request.responseText;Lightbox.prototype.initialize();} for this you just need to add 'Lightbox.prototype.initialize();' all this does is reload light box after your ajax call is finished. for the most part it does seem to work but sometimes i notice the light box borders for the image beind displayed is broken and sometimes its fine. I still am not sure why it probbaly has sometime to do with conflicts in css files. its just a guess though, but let me know if it works on your end.I tested the code out and it seems to work so far. I noticed a few things you should change to keep your code abit clean1. you have 2 copies of the ajax javascript function from dynamic drive I would suggest you delete one.2. //Contents for menu 2, and so onvar menu2=new Array()menu2[0]='<a href="http://forums.xisto.com/no_longer_exists/ href="http://forums.xisto.com/no_longer_exists/ href="http://www.bbc.co.uk/news News</a>' doesnt look like its being used you could delete it also.
  20. Yeah they are something to be afraid of. The size of them is so huge, I'd like to see how they would react to a cat and if they cat will even have the nerves to challenge it lol. They are seriously big. Although the guy I saw on the news this morning holding it was not too scared of getting bitten. I dont even know if they tested them out for any diseases yet. If they were threaten I'm sure they could put up some kind of fight.
  21. for the logo / header image there is no image file for it so either find one or make then then upload it to either the same folder if that dosent work try put it in the style folder // your header div<div id="logo">// the style that goes with it#logo {colour.css (line 18)background:#444444 url(logo.jpg) no-repeat scroll left center;border-color:#FFFFFF;} as you can see the image its looking for is logo.jpg and i cant find it in your root folder or style folder so there is your problem.
  22. I've been reading through my old php book (PHP 4.1) and came across this data validation class. It can check a number of things ranging from telephone numbers , credit card number formats, email address and some others. I checked out some of the methods although I didnt expect it to work 100% because I've found source code errors thoughout the book and CD. I tested out a few of the methods to check and some of them did return expected results but some didnt either so the data validation class was not perfect and it didnt really bother me. The cool thing I found in the class was a method to validate an email address by contacting the server and asking the server if they were serving that particular email address. So far that seems like the best method to validate an email address before inserting it into your database. Well it turns out unlike some of the other methods that seem to work or just fail this one actually crashes apache so everytime it runs it will somehow make apache hang. I dont know why thats why I'm going to post it here and see if anyone can figure out why.Heres the full class code. the 'email_works' method is the very last one in the class. <?phpdefine ('DV_ERR_UNKNOWN', 0);define ('DV_ERR_TEL_TOO_SHORT', 1);define ('DV_ERR_TEL_TOO_LONG', 2);define ('DV_ERR_TEL_ILLEGAL_CHARS', 3);class DV { var $errtype; var $errstr; function DV () { $this->errtype = FALSE; $this->errstr = ''; } /* * method: is_us_tel ($tel) * args: $tel (value to test) * * Tests $tel to see if it looks like a U.S. telephone number (ten digits * including area code). We ignore any parentheses, dashes, dots or spaces. */ function is_us_tel ($tel) { // replace parentheses, dashes, dots or spaces with '' $new_tel = ereg_replace ("[\(\)\. -]", "", $tel); $l = strlen ($new_tel); if ($l < 10) { $this->errtype = DV_ERR_TEL_TOO_SHORT; $this->errstr = "Telephone numbers must have 10 digits. ('$tel' " . "contains $l digits.)"; return false; } if ($l > 10) { $this->errtype = DV_ERR_TEL_TOO_LONG; $this->errstr = "Telephone numbers must have 10 digits. ('$tel' " . "contains $l digits.)"; return false; } // make sure there are only digits left if (ereg ("[^0-9]", $new_tel)) { $this->errtype = DV_ERR_TEL_ILLEGAL_CHARS; $this->errstr = "'$tel' is not valid. Telephone numbers may " . "only contain digits, parentheses and dashes."; return false; } return true; } /* * method: is_us_zip ($zip) * args: $zip (value to test) * * Tests $zip to see if it looks like a U.S. zip code (five digits). */ function is_us_zip ($zip) { // match exactly five digits if (!ereg ("^[0-9]{5}$", $zip)) return false; return true; } /* * method: is_us_zip_plus_four ($zip) * args: $zip (value to test) * * Tests $zip to see if it looks like a U.S. zip+4 (five digits followed by * a dash followed by four digits). */ function is_us_zip_plus_four ($zip) { // match exactly five digits followed by dash followed by four digits if (!ereg ("^[0-9]{5}-[0-9][{4}$", $zip)) return false; return true; } /* * method: is_valid_cc_num ($num, $type) * args: $num (credit card number to test) * $type (type of card) * * Checks validity of Visa, Discover, Mastercard, AmEx credit card numbers. * First arg is the credit card number, second is card type. Card type may be * one of 'visa', 'discover', 'mastercard', 'amex'. Uses hard-coded knowledge * about card numbers (e.g., all Visa card numbers start with 4) and mod10 * algorithm to check validity. * * Note that the $num argument must be a string, not a float or integer. */ function is_valid_cc_num ($num, $type) { $ndigits = strlen ((string) $num); switch ($type) { case ('visa'): // must begin w/ '4' and be 13 or 16 digits long if (substr ($num, 0, 1) != '4') return false; if (!(($ndigits == 13) || ($ndigits == 16))) return false; break; case ('discover'): // must begin w/ '6011' and be 16 digits long if (substr ($num, 0, 4) != '6011') return false; if ($ndigits != 16) return false; break; case ('mastercard'): // must begin w/ two-digit num between 51 and 55 // and be 16 digits long if (intval (substr ($num, 0, 2)) < 51) return false; if (intval (substr ($num, 0, 2)) > 55) return false; if ($ndigits != 16) return false; break; case ('amex'): // must begin w/ '34' or '37' and be 15 digits long if (!((susbtr ($num, 0, 2) == '34') || (substr ($num, 0, 2) == '37'))) return false; if ($ndigits != 15) return false; break; default: return false; } // compute checksum using mod10 algorithm $checksum = 0; $curpos = $ndigits - 2; while ($curpos >= 0) { $double = intval (substr ($num, $curpos, 1)) * 2; for ($i = 0; $i < strlen ($double); $i++) $checksum += intval (substr ($double, $i, 1)); $curpos = $curpos - 2; } $curpos = $ndigits - 1; while ($curpos >= 0) { $checksum += intval (substr ($num, $curpos, 1)); $curpos = $curpos - 2; } // see if checksum is valid (must be multiple of 10) if (($checksum % 10) != 0) return false; return true; } /* * method: is_email ($email) * args: $email (value to test) * * Tests $email to see if it looks like an e-mail address. This only works * for 'simple' email addresses in the format 'user@example.com'. */ function is_email ($email) { $tmp = split ("@", $email); if (count ($tmp) < 1) return false; if (count ($tmp) > 2) return false; $username = $tmp[0]; $hostname = $tmp[1]; // make sure $username contains at least one of the following: // letter digit _ + - . if (!eregi ("^[a-z0-9_\+\.\-]+$", $username)) return false; // make sure $hostname is valid (see is_hostname() below) if (!$this->is_hostname ($hostname)) return false; return true; } /* * method: is_hostname ($host) * args: $host (value to test) * * Tests $host to see if it looks like a valid Internet hostname. */ function is_hostname ($host) { // make sure $h: starts with a letter or digit; contains at least // one dot; only contains letters, digits, hypehns and dots; and // ends with a TLD that is a) at least 2 characters and only // contains letters if ( !eregi ("^[a-z0-9]{1}[a-z0-9\.\-]*\.[a-z]{2,}$", $host)) return false; // make sure the hostname doesn't contain any nonsense sequences // involving adjacent dots/dashes if (ereg ("\.\.", $host) || ereg ("\.-", $host) || ereg ("-\.", $host)) return false; return true; } /* * method: is_email_rfc822 ($email) * args: $email (address to validate) * * We pass $mail off to imap_rfc822_parse_adrlist() and check to see whether a) * it returned a 1-element array as expected and if it did, whether any * errors were caught by imap_rfc822_parse_adrlist() during checking. */ function is_email_rfc822 ($email) { $addrs = imap_rfc822_parse_adrlist ($email, ''); if (count ($addrs) != 1) return false; if ($s = imap_errors()) $this->errstr = "The following errors were found: "; for ($i = 0; $i < count ($s); $i++) $this->errstr .= $i + 1 . ". " . $s[$i] . " "; return false; return true; } /* * function email_works ($email) * args: $email (address to test) * We simulate an SMTP session to the server and use the 'RCPT TO' * to see whether the mail server will accept mail for this user. */ function email_works ($email) { // get the list of mail serves for the user's host/domain name list ($addr, $hostname) = explode ("@", $email); if (!getmxrr ($hostname, $mailhosts)) $mailhosts = array ($hostname); // if no MX records found // simply try their hostname $test_from = "me@domain.com"; // replace w/ your address for ($i = 0; $i < count ($mailhosts); $i++) { // open a connection on port 25 to the recipient's mail server $fp = fsockopen ($mailhosts[$i], 25); if (!$fp) continue; $r = fgets($fp, 1024); // talk to the mail server fwrite ($fp, "HELLO " . $_SERVER['SERVER_NAME'] . "\r\n"); $r = fgets ($fp, 1024); if (!eregi("^250", $r)) { fwrite ($fp, "QUIT\r\n"); fclose ($fp); continue; } fwrite ($fp, "MAIL FROM: <" . $test_from . ">\r\n"); $r = fgets ($fp, 1024); if (!eregi("^250", $r)) { fwrite ($fp, "QUIT\r\n"); fclose ($fp); continue; } fwrite ($fp, "RCPT TO: <" . $email . ">\r\n"); $r = fgets ($fp, 1024); if (!eregi("^250", $r)) { fwrite ($fp, "QUIT\r\n"); fclose ($fp); continue; } // if we got here, we can send email from $test_from to $mail fwrite ($fp, "QUIT\r\n"); $r = fgets($fp, 1024); fclose ($fp); return true; } return false; }}?> I'm using it like this ($s is just short for $_SESSION) $test_email = new DV; $test1 = $test_email->email_works($s['app_email']); Test it out on your server if you have time. I dont really understand the email_works method to be honest but the code isnt throwing any errors and I'm not sure why it isnt working. If there is something similar or better I can use for email validation out there please let me know. I've used a simplier alternative to this in the past but I think its limited in that it doesent check if the email is valid on the server.Heres the code: I think i got it off php.net in the past function ck_email ($mail) { //default $ck_email_result = "Default"; //pattern $regex = '/\A(?:[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+' .'(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@' .'(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[a-z]{2}|' .'com|org|net|gov|biz|info|name|aero|biz|info|jobs|' .'museum)\\Z/i'; if ($mail == '') { $ck_email_result = "<span class='error_header'>Email Required!</span>"; } else if (preg_match($regex, $mail)) { $ck_email_result = "<span class='ok_header'>OK!</span>"; } else { $ck_email_result = "<span class='error_header'>Invalid Emai!</span>"; } return $ck_email_result;} Again if you have any suggestions for improvment or an alternative to this function please let me know or better yet share your method or way of checking for valid email addresses.
  23. I've got a good amout of buffer on my credits so far so I'm not too concerned about trying to post just to keep my points up. What I do is just watch out of any interesting post that I can reply to, anything thats recently been active so I usually check 'vew new post' link. Lately not much has interest me so I can see how it can be difficult to get points if you dont have much time. I'm always on forums everyday now but yeah the content hasnt interest me all too much. I'm stuck with learning and working on my project everyday so I guess reading the forums and responding to them is my way of relaxing from work. If you cant check forums everyday for at least 30mins to read and respond to some post its still possible to keep your points up. I think posting about 1-2 good post per week should be good enough to keep your credits up. But becareful because at a certain stage (number of post) the credits you get per post will be smaller in amount and you may get caught out. I was racking up alot of points before i was hosted and when i got hosted i think points got reseted so now I'm gaining smaller amouts of points because my post count is kind of high.I would recommend you always try and keep 30 points or more so if something does come up and you cant somehow make it to forums you have 30 days to get back and post again without losing your hosting. This just creates alot of hassle when you do get suspended. There is no other way to cheat this you have to post to get points, eventually its going to be hard for people who cant post here often to keep up points when the amount of points given per post is smaller. Their post will have to be extra long and of good quality if they are going to post fewer times.
  24. There are too many scammers out there you just gotta be careful no matter who you are dealing with. There are people who will try and rip you off if your too trusting. As for doing free work for your portfolio thats not a bad idea but whats better is doing that free work for yourself and use that as your portfolio, why do you need to do free work for someone else unless the job depended on them giving you the work or you have no idea what to do on your own.
  25. check out that guys profile lol he hasnt been back since the day he made those post. Probably after his hosting application got denied he never returned. This looks really fishy anyway most likely some guy looking for free work from you and wont pay.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.