Jump to content

d22552000

Members
  • Posts

    535
  • Joined

  • Last visited

    Never

Everything posted by d22552000

  1. My ENTIRE site is simply a 600kb "html/html.php" and functions, then when I change one thing in the style of the site, the ENTIRe site changes at once. <?PHP //EXCERPTS FROM HTML.PHP //... function index($before,$after,$level,$err) { echo $DOCTYPE.$HEADER.'Home'.$STYLE.$HEAD2.$STUFF.' //index content is here // '.$END; } //... ?> I even have it where the ENTIRE document has two version of the site where one version is xhtml (/>) and one is html (>) just incase I ever need both. It is much faster. I suggest you render everything at once... THEN echo it to the browser.
  2. hmm the % should only LIMIT , not change the thing to always be 100 TRY THIS: turn $width from 125 to 1.25, then use the * script that you had.
  3. % makes it so that $width is the MAX that the image can be. try it out and tell me if it works.
  4. no clue, beacues I can do $row = $results; and ti works fine, I dont know why your connection is a class, but I guess, whatever suites you.
  5. try echoing $NEWCURRENTENERGY and see what its value is, cause that may be the unusually high value, I notice is is being multiplied by width... ?? $NewCurrentEnergy = ($CurrentEnergy / $MaxEnergy) * $width; Maybe try...? $NewCurrentEnergy = ($CurrentEnergy / $MaxEnergy) % $width; use % says "MAX" in mathml I believe... This might make the bar too smal though, tell me what it does
  6. this is a javascript problem as far as I know, and I suck at javascript, how about you leave it in a function and change it to a button instead of a link? or change the href to "" and do "ONCLICK="function_name""
  7. coudl you please open yoru script in notpad and use "edit => goto" and please point out what is line 183
  8. this SHOULD work for multiple words , althogh it would have to consists of all the words mentinoed for it to work, how about your split the search terms by spaces like if they entere three words "this my search" then you would have $s[0]='this' $s[1]='my' $s[2]='search' use split(" ",$mysearch) for this. Now that you have the search terms split, loop throgh them: foreach($s as $mysearch) { } FULL CODE BELOW: function get_search_books($mysearch) { // query database for the books in a category $mysearch =$_POST['searchlike']; $mysearch= trim($mysearch); if (!$mysearch || $mysearch=='') return false; $conn = db_connect(); /* START OF EDIT */ $MAXWORDS = 5; /* It has to query PER word, so set the max search terms here. It will treat the last search term as all remaining words that have not been searched for, so if this is 3 then the third search to the db is everything NOT in the second and first searches. */ $s = split(' ', $mysearch, $MAXWORDS); $result = ''; /* This sets result as a blank string , to aviod the NOTICE of appening data to nothing */ foreach($s as $mysearch) { $sql = "SELECT No, description, title, author, isbn, price FROM books "; $sql .= "WHERE `No` LIKE '%$mysearch%' "; $sql .= "OR `description` LIKE '%$mysearch%' "; $sql .= "OR `title` LIKE '%$mysearch%' "; $sql .= "OR `author` LIKE '%$mysearch%' "; $sql .= "OR `isbn` LIKE '%$mysearch%' "; $result.= @$conn->query($sql); /* Notice the . before the = , this appends the results to the previous results. */ } /* END OF EDIT */ if (!$result) return false; $num_books = @$result->num_rows; if ($num_books ==0) return false; $result = db_result_to_array($result); return $result; }
  9. imgussing that bar is either courage or exp/hp? in any case the only immediate error I see is: "id='bv_''" in HTML every ID must be UNIQUE. this will not show anyerrors, but may cause freak errors liek this.
  10. sooooooooooooooooo how do I do it? I know I do a column with a BLOB of size of the max file size I guess... then I tell php to do: fopen($FILE,'rb'); fread($file,1024); (loop) then I send the info to the db??? How would I download the file later then, would I have to write it to a fiel first? or could I ouptu it to the browser if I supply , content-type: binary?
  11. you can't do anything about latin characters unless you run trans on the file name before showing it.also latin characters will only work if IE allows the characters to be shown. WHat SHOULD happen is that all latin characters be turned to standard ascii characters, but you would sue TRANS() for this. Hope that helps.
  12. I know. that is just the TEMPLATE of a doctyp,e if you run that throuh regular matching on a text filed then the user could enter any of hte following and be allowed through: <!DOCTYPE html PUBLIC "-//W3C//DTD *//EN" "http://www.w3.org/TR/*"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" Do you; understand what I mean though, wildcard matching...?
  13. May I ask why you are escaping (adding \) before your apostraphes? (')
  14. here is yoru mixed JS: function setFocus(aField) { document.forms[0][aField].focus(); } function isAnEmailAddress(aTextField) { if (document.forms[0][aTextField].value.length<5) { return false; } else if (document.forms[0][aTextField].value.indexOf("@") < 1) { return false; } else if (document.forms[0][aTextField].value.length - document.forms[0][aTextField].value.indexOf("@") < 4) { return false; } else { return true; } } function isEmpty(aTextField) { if ((document.forms[0][aTextField].value.length==0) || (document.forms[0][aTextField].value==null)) { return true; } else { return false; } } function validate() { if (isEmpty("username")) { alert("Please fill your username."); setFocus("username"); return false; } if (isEmpty("password")) { alert("Please fill in your password."); setFocus("password"); return false; } if (!isAnEmailAddress("email")) { alert("The entered email address is invalid."); setFocus("email"); return false; } return true; } // THIS IS THE SPACE BETWEEN THE SCRIPTS // function validatePwd() { var invalid = " "; // Invalid character is a space var minLength = 6; // Minimum length var pw1 = document.myForm.password.value; var pw2 = document.myForm.password2.value; // check for a value in both fields. if (pw1 == '' || pw2 == '') { alert('Please enter your password twice.'); return false; } // check for minimum length if (document.myForm.password.value.length < minLength) { alert('Your password must be at least ' + minLength + ' characters long. Try again.'); return false; } // check for spaces if (document.myForm.password.value.indexOf(invalid) > -1) { alert("Sorry, spaces are not allowed."); return false; } else { if (pw1 != pw2) { alert ("You did not enter the same new password twice. Please re-enter your password."); return false; } else { alert('Nice job.'); return true; } } }
  15. I would not say on_change casue that means every time they type a single letter or number into it... try,... onchange. then try this: TI4SCAN-4.php?BundleNum change that to a FULL url not a relative url. in IE if you say "./TI4SCAN-4.php?BundleNum" it will automatically convert it to a full url.
  16. just by reading your topic name )and not having time to read responses( suprisingly within the DTDof XHTML 1.1 Strict you can change an image by % "width='10%' height='10%'" and its perfectly valid.
  17. All you can do is match it by wildcards: <!DOCTYPE html PUBLIC "-//W3C//DTD *//EN" "http://www.w3.org/TR/*"> Hope that helps.
  18. well woudl ya look at that... a perfect solution. Thank's man.
  19. I though thte top line was just for permission... hmm weird if it actually tells it were to get hten scripts and apache for linux is programmed rly badly lol.
  20. Even though this is not QUITE related to a webserver, some webservers return the usage% in a sys variable but mine doesnt. How would I get the cpu usage from the commandline or in my php script? like I could say: if ($CPUSG > 75) { error_msg('The server is busy processing user's requests. Please try again later.',500); } But how would I get the cpu usage?
  21. fair enough. I will just stay in edit thank you very much. *three beeps can be heard from a mother board speaker* "SWEET" is yelled and a the screen goes blue with gray html code. In windows 95 and up go to "CMD.EXE" or "COMMAND.COM" and run EDIT [/b] %FILENAME%. The /b option is an alternate chrome color scheme. In MSDOS 7 and down, just type "EDIT" %FILENAME%
  22. I cannot find a background tag for TD or table anymore, so I switched to css. <BR/>Retrieving Download From Server... <TABLE height="20" width="300"><TR><TD class="bar" ID="bar" name="bar" title="bar">*%</TD><TD WIDTH="*"></TD></TR></TABLE> I removed the PHP bits that echo percentage and replaced them with *. My css is: body,td,th { font-family: Geneva, Arial, Helvetica, sans-serif; text-align:center; font-size: 14px; color: #CCCCCC; border: thin; } th { border: 0; } table { border: 0; } .bar,#bar,bar { background-image: url('BG.gif'); background-repeat: repeat-x; } Please tell me why the bar does not take the background image...
  23. hey, I HAVE made my own webserver and it works on windows, I am just trying to get chmodding to work under linux and then its perfect :D I tried the mega upload php file upload, but it gives INTERNAL SERVER ERROR 500 on teh cgi script.. No info in the log file for cgi though... wtf/. THE FUNNY Part is that their online demo returns 500, so this means their code sucks... Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, raditha@raditha.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. -------------------------------------------------------------------------------- Apache/2.0.52 (CentOS) Server at www.raditha.com Port 80 hahah idiots
×
×
  • 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.