Jump to content

Nitroware

Members
  • Posts

    36
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.rsclegacy.com

Profile Information

  • Gender
    Not Telling

Nitroware's Achievements

Member

Member (2/5)

0

Reputation

  1. If not, does anybody know of a forum that would have people that would know how to do or fix this?
  2. Ya, JavaScript, when you look into it, is VERY similar to PHP. But here is your example: <?php $result1 = mysql_query("SELECT * FROM ajaxim_users", $openDB); $num_rows1 = mysql_num_rows($result1); $result2 = mysql_query("SELECT * FROM ajaxim_users WHERE is_online = 1 AND admin = 1", $openDB); $num_rows2 = mysql_num_rows($result2); $result3 = mysql_query("SELECT * FROM ajaxim_users WHERE is_online = 1 AND admin = 0", $openDB); $num_rows3 = mysql_num_rows($result3); $result4 = mysql_query("SELECT * FROM ajaxim_users WHERE banned = 1", $openDB); $num_rows4 = mysql_num_rows($result4); $result5 = mysql_query("SELECT * FROM ajaxim_chats", $openDB); $num_rows5 = mysql_num_rows($result5); if ($_GET[ajax]){ echo $num_rows1."~". $num_rows2."~". $num_rows3."~". $num_rows4."~". $num_rows5; }else{ ?> <script language="Javascript"> //The time is the 10000. It is in miliseconds setTimeout("glbup()",10000); function xmlhttpPost(strURL) { var xmlHttpReq = false; var self = this; // Mozilla/Safari if (window.XMLHttpRequest) { self.xmlHttpReq = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); } self.xmlHttpReq.open('POST', strURL, true); self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); self.xmlHttpReq.onreadystatechange = function() { if (self.xmlHttpReq.readyState == 4) { ajax_glbup(self.xmlHttpReq.responseText); } } self.xmlHttpReq.send(getquerystring()); } function getquerystring() { var form = document.forms['f1']; var word = form.word.value; qstr = 'w=' + escape(word); // NOTE: no '?' before querystring return qstr; } function updatepage(str){ document.getElementById("result").innerHTML = str; } function ajax_glbup(str){ str=str.Split("~"); document.getElementById("mb").innerHTML=str[0]; document.getElementById("oa").innerHTML=str[1]; document.getElementById("ou").innerHTML=str[2]; document.getElementById("bu").innerHTML=str[3]; document.getElementById("cr").innerHTML=str[4]; } function glbup(){ //document.getElementById("mb").innerHTML //This is where everything is executed. Insert URL here: xmlhttpPost("{INSERT URL HERE OF THIS SCRIPT}?ajax=1"); setTimeout("glbup()",10000); } </script> <strong>Members:</strong><br /><div id="mb"><?echo"$num_rows1";?></div><hr /> <strong>Online Admins:</strong><br /><div id="oa"><?echo"$num_rows2";?></div><hr /> <strong>Online Users:</strong><br /><div id="ou"><?echo"$num_rows3";?></div><hr /> <strong>Banned Users:</strong><br /><div id="bu"><?echo"$num_rows4";?></div><hr /> <strong>Chatrooms:</strong><br /><div id="cr"><?echo"$num_rows5";?></div><hr /> <form name="f1"> <p>word: <input name="word" onchange="jsupdate('word','{INSERT URL HERE}')" type="text"> <div id="result"></div> </form> </body> </html> <? } ?> There is a rough draft. I have to leave, but try that, and play with it. It should work, if not I'm sure somebody else on the forum can help if im not back by then.
  3. The first one is because (I think) $error is not defined as an array: <? $error=array(); ?>
  4. SOme code would be nice, however, I do website design, I have 12 domains and 65+ subdomains, and I have never come close having a "MySQL overdose" . If you are interested, I would try 1and1. They have very good pricing, and even better customer support. (If you do, could you use my link, when you sign up, you get points if you refer somebody). Anyway, efficiency and security is one of my specialties, so again, some code will be useful. (I know, I am all over the place, sorry)
  5. You are going to need to use AJAX. Its basically JavaScript with some XML and PHP thrown in. Its pretty simple when you get the hang of it, but untill then I would do some practive first. Try W3Schools. Do you need to send post data or GET data? If not, I can write one really easy for you.
  6. does anybody know how fix PHP, or even know of linux (fedora) HTML to PDF converter (CLI ideally) that I can have PHP execute when its ready? Either of those would work as well.
  7. ok, but how hard is it to create what I would otherwise create with HTML. My invoice is not terribly complex, but it isn't easy either. There is another project based of FPDF that does html conversion, but there is no documentation whatsoever so I don't know how to use it.
  8. ya, you mean like this: <?php if (takeDiamond(vars...)){ do whatever is right... }else{ do whatever when it returns false } ?> or <?php $var=takeDiamond(vars...) if ($var){ do whatever is right... }else{ do whatever when it returns false } ?>
  9. You are better off just having a bunch uploaded, and having your EMBED part in the HTML define a location for flash to load. Its a little rick, but is very doable.
  10. COuld you expand on what you are saying please? I little more information would help.
  11. Hey all, I have seem to have run into a problem with this concept. What I am trying to do is convert my invoices to PDF's. The PHP script makes an HTML version of it, and then when I confirm it is ready, I want it to convert it to PDF. I have tried the PDFlib PECL thing, however im not quite sure how to install it (I cannot find a makefile, rpm, or repo [fedora]) to do this. I tried another one, however it requires "DOM". When I looked at that it said in my phpinfo() that there was a "--disable-dom". The only way ive seen to fix this is with a PHP reinstallation, and I don't want to ga THAT far. If anybody know a good PDF php script that doesn't use either of these, or knows how to fix either, and help would be VERRY useful. Thanks for any replies!
  12. Ok, I am writing a php CLI interface for linux, as a helper app. It runs similar to mysql (with the "mysql>" type sessions). The annoying part about it, is that whenever I change anything, I have to type exit, then the applet name again. Its not that bad, but after a while, It gets annoying. So what I want to be able to do is type "restart", and it will reload the php file. If anybody has any ideas, it would be greatly appreciated! Thanks in advance!
  13. Is there a way of taking a long article, and making ajax, or JS only allow 7 or so allowed lines, with a ... at the end? I know how to count characters, but that doesnt include <br>'s and <p>'s in the amount of characters. So if the line is short then breaks, it doesnt count the whitespace created. Any help?
  14. Does anybody know how to host your own domains, with DNS and all?
×
×
  • 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.