Jump to content

MRGRIM

Dedicated Members
  • Posts

    531
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MRGRIM

  1. http://ssandler.wordpress.com/MTmini/ Enjoy
  2. Supreme Nerd. Apply for a professorship at MIT now!!!.
  3. Are you use IE 6 or IE 7? IE 7 actually has a built in import cookie wizard learn something every day
  4. Have you thought about relocating the temporary internet folder? I haven’t though this idea through 100% but I imagine you could create a new folder with your cookies, and then redirect IE to use this folder? I am assuming you want this done on the fly i.e. you don't want to have to reboot? http://www.winxptutor.com/movetif.htm The limiting factor with this is Windows only reads the registry at logon I would guess IE would be the same?
  5. Windows already comes with one ;)
  6. Buy a small tablet PC and hand write your notes.
  7. I'm always looking for Icons and Images when doing various projections, over the years I've found some good sites and lost them due to not backing them up. So far I've found this;- http://www.freeiconsweb.com/gif_icons.htm I have bought icon's and images in the past but I know there must be 100's of good sites out there, I just don't have the time to go thought pages of sponsored links on google
  8. Useful stuff, I will try it on my SBS box when I get home.
  9. Ok, thanks for the links I'll give them a look. I am really like the Firebug plugin - very very useful, thanks for the heads up on that one.
  10. would you like cream on your cake also?
  11. url=url+"&mid"+mid Errrm yeah in the quotes there should be I'll go modify that now... not sure if that would cause a problem though, seen as the function the other end isn't using the data I'm passing it at the moment. Debugging it is a pain, however IE is not showing me any JS errors, so it's me whos doing something wrong :) Right ok, we seem to be onto something I uncommented Alert(xmlHttp.responseText) And it started alerting me (not sure if Alert works in FF? Will have to brush up on my JS) but I started to get "failed to includes" PHP errors, so it looks like I know what the problem is, however I'm trying to make my code as reusable as possible, so my problem now is the DB connection is sat in its own DIR. Has anyone got any advice on this? As the AJAX is running from the root and the file its calling is 1 DIR down, so is then going back up to get the DB Connection, yet other functions are running off that, so moving and change path strings is going to make things a real mess. ;) does anyone even know what I am talking about?
  12. Validation will be done once everything is up and running, thanks for the heads up though. //Do Some Shit Here with xmlHttp.responseText See this is where I am confused, surely this would just be "Hello World"; ? What my problem is the database isn't getting updated via Ajax. (I could be wrong) but from my understand the .responceText would normally just be a resultant dataset? I don't intend on returning any value, as I just want the DB update to happen slightly in the background.
  13. Any reason for running both? I'd trying using R-Studio for Data Recovery, if the disk is on it's knee's I'd try using HDD Regenerator I think both come as "free" trials that allow you to run them and see what they find, if you like it buy it :) or Iso it ;)
  14. Ok, I've started to play around with Ajax (I am a late adopter I know), I found a PHP/Ajax example on W3Schools, the example works fine when I recreate it, but when I try and fudge it into my code it doesn’t work (I prefer to work/learn by copying examples, pushing and peeking etc – so the go read a book/Google doesn’t work as well for me – though I did start reading “Beginning PHP and MySQL E Commerce 2nd Edition” Published by Apres, it has a very similar example. Anyway, what I currently have is a user message system, where site users can send each other short messages (PM’s basically) this works fine, everything is dandy. I have a JavaScript function that allows the user to hide or show the message body (collapses or expands the content) similar to what they do at Iso Hunt, so I figured this would be an excellent opportunity to try my hand at some Ajax and actually get the status of the message updated and saved (Collapsed or Expanded) sounds simple enough, no? Now my site is currently laid out as follows;- Root -Index.php [scripts] -DB Connection.php -Message Class.php [Modules] -Message Function.php (So that’s Root/Index.php, Root/Scripts/DB Connection.php, Root/Modules/Message Function.php etc) I hope this will make sense to someone, this started out as a small Friday night code mash up a few weeks ago, now I seem to be spending all my spare time hitting my head against the wall. I need some help with debugging what's going on in the Javascript, at the moment my message hide and show works, but It looks like the Ajax side of things isn't working :( Index.php <?php session_start(); //Instantiate Session and DB classes ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <link href="css/theme.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> var xmlHttp function getParentElement(elem, searchtag, mid, state) { xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } var url="modules/messages.php" url=url+"?action=updateMessageStatus" url=url+"&mid"+mid url=url+"&state="+state //creates a random sid to prevent caching url=url+"&sid="+Math.random() xmlHttp.onreadystatechange=stateChanged xmlHttp.open("GET",url,true) xmlHttp.send(null) while(elem.tagName.toLowerCase() != searchtag) { if(!elem.parentNode) return false; elem = elem.parentNode; } return elem; } function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { //Alert(xmlHttp.responseText) } } function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { //Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } </script> </head> <body class=""> <p align="right"> <img src="images/logo.jpg" alt="Logo" width="388" height="135" /> </p> <br /> <?php //Include Menu ?> <br /> <?php //Include modules user has requested include(modules/messages.php) ?> <br /> <?php //Include disclaimer ?> </body> </html> modules/message.php <?php //check if a view is defined if (isset($_GET['view'])) { if ($_GET['view']=='inbox') { include_once('scripts/cMessages.class.php'); //include_once('scripts/message_functions.php'); //initialise the CCustomers class for usage $messages = new CMessages; //call the viewAllMessages function (takes the user id of the current user) fixed for testing $messages->viewAllMessages(00001); } } if (isset($_GET['action'])) { if ($_GET['action']=='updateMessageStatus') { include_once('scripts/cMessages.class.php'); $messages = new CMessages; //use the following fixed message values (i.e. only update the following message, for testing purposes) $message_id='0000000005'; $message_action='1'; $messages->updateMessageState($message_id, $message_action); } } ?> scripts/cMessages.class.php <?php class CMessages extends CDBConn { //--------------------------------------------------------- //View all messages stored in the DB function viewAllMessages($user_id) { $this->sql = "SELECT * FROM user_messages WHERE to_user_id=".$user_id." and deleted=0 ORDER BY created DESC"; $this->DBExecute($this->sql); while($this->row = mysql_fetch_array($this->rs, MYSQL_ASSOC)) { $hidestatus = $this->row['hide']; if ($hidestatus==0) { $hidestatus="opened"; } else { $hidestatus="closed"; } ?> <table width="100%" cellpadding="0" cellspacing="0"> <tbody class="<?=$hidestatus?>"> <tr class="whenclosed" height="25px" valign="top"> <td class="bordersmall"><?=$this->row['title'];?> - <i><?=date("H:i d-m-y", strtotime($this->row['created']));?></i></td><td class="bordersmall"><div align="right"><a href="#" onClick="getParentElement(this, 'tbody', '<?=$this->row['message_id'];?>', 'Show').className='opened';return false;">Show</a></div></td> </tr> <tr class="whenopened" height="25px" valign="top"> <td class="bordersmall"><?=$this->row['title'];?> - <i><?=date("H:i d-m-y", strtotime($this->row['created']));?></i></td><td class="bordersmall"><div align="right"><a href="#" onClick="getParentElement(this, 'tbody', '<?=$this->row['message_id'];?>', 'Hide').className='closed';return false;">Hide</a></div></td> </tr> <tr class="whenopened"> <td class="blacktext" colspan="2"><?=$this->row['content'];?><p> </p></td> </tr> </tbody> </table> <br /> <? } } //------------------------------------------------------- function updateMessageState($message_id, $message_action) {h $this->sql = "UPDATE quoteforit.user_messages SET hide=".$message_action." WHERE message_id = ".$message_id; $this->DBExecute($this->sql); } }; ?>
  15. Doesn't the Intel graphics drivers provide something similar? I remember getting really annoyed when I accidently flippled my screen upside down (ok so it doesn't mirror it, but you can change the screen orientation)
  16. I'll admit it, I did LOL when I read thread. I had a customer once who had picked up on some jargon we used e.g. "Windows Repair", "Reinstall" they rang with a problem, can't remember the specific's but it was something quite simple but would require a site visit. I turned up to find that the director of the company had reinstalled Windows XP to "save me time" I could not belive it when I got there, he was like "so.... what's the problem" ;)
  17. MRGRIM

    bandwith

    Because it's a way to make money, they are selling a service, part of that service is providing you with bandwidth. I'm sure if someone provided unlimited bandwidth hosting then it would quickly be abused. The software I am writing is sold in two packages;- 1. Self install, you buy it, look after it and pay a support contract or a per incident fee 2. You pay a per monthly fee to have it hosted with myself. Alot of the hosting options are money for nothing, a customer may think, 10GB monthly usage, well I may have a busy month and for the sake of $10 a month I may as well go to 50GB. To be honest I have never had a problem with bandwidth, every hosting package I've ever had or provided has always been ample.
  18. There might be - however when you logon to the domain, the DC generates a SID, this SID is used to check what permissions you have - mainly to network resources, then a Group Policy is applied to your system, the policy will remove the run command etc Personally I'd leave the system alone - if you don't have these permissions then you probally don't have them for a reason.
  19. Boot off your Vista disk and try and repair
  20. Use a bait box to trap them, once you have snagged one get it pregnant so it will never run away. Sounds like the perfect idea for a new MMORPG ;)
  21. I've bought a new rack server to replace my old SBS box in the house. I've never been involved in a domain migration so am looking for people with past experience or advice on how to do so. I'm in a couple of minds at the moment;- 1. Swing Migration 2. Regular MS Domain Migration 3. Disk Image (e.g. Acronis True Image) Option 3 will offer me a problem free (fingers crossed) option, however part of the reason for the new server was to learn a given methodology. A friend has loaned me a copy of his Swing Migration kit, but I am reading the documents and my head is sent spinning - I'll give them another read as I was short on time when I started. Your comments are most welcome
  22. Ask you domain admin. Domain permissions are controlled by the domain controller, all you would be able to do is give yourself local administrator permissions (which it sounds like you've done already)
×
×
  • Create New...