Jump to content
MakeWebGames

Hash-Op

Members
  • Posts

    74
  • Joined

  • Last visited

    Never

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Hash-Op's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Re: Looking for template Ah sorry Here it is:   http://unknownone.co.uk/mccodes/play01/   Its been ported sucessfully, but awful for a gaming site xD Just for fun, I was bored
  2. Re: Only Let You Do Something When You Have Done A Course Looks like you havn't included all 4 fields inv_id inv_itemid inv_userid inv_qty You'll have to include all 4 or the script wont know where each one goes into
  3. Re: Xampp and Mccodes? PM me, I'll be more than happy to guide you through it via teamviewer - when I have time! So you'll have to be patient :)
  4. Re: Looking for template Here is something I have ported from wordpress It looks pretyt hot although its not perfect for a game xD I still have to leanr how to implement it into php Once I can do that, I would be more than happy to make you a free template seeing as you've been waiting for ages
  5. Re: Looking for template I can do it.. just not so good at implementing it into the header file.. I'm looking for someone to help me with this part =/
  6. Re: Ajax Contact Form   That function is not needed, why have it when you can just stripslashes() okay a function would be okay if you have more in it but you simpley just have stripslashes so there's no need. Hmm You've got a good point Could anyone possibly explain this? Please?
  7. Re: SQL Injections Just a question: what if you ioncubed your files? zend/ioncube. I 'd go with ioncube, newer and hasn't been cracked in public yet xD How would that effect injects?
  8. Re: MySQL Configuration Thank you very much :)
  9. Re: Web 2.0 Login for Mccodes Great work XCU53S I would use it but Im more of a "all in 2/3 images" login page guy xD Well done man +1
  10. Re: PLEASE DONT LISTEN TO SKULL ABOUT BUYING LW CODES ITS A SCAM "The Phenomenal Ishz" & "Nedved" - shut up You two were total in-diots That guy acutally guessed / knew your cpanel password. At times like this, I must call you both "POOFTERS" Your site gone anyway You've lost the members and what not And oh my dear "The Phenomenal Ishz"; shut up. :-D Who was your "lawyer"? Me Who saved you from going to court? Me Oh god, I just had to brag about that xD Seriosuly dude First you try to sell someone elses template for mccodes on CE now you complain about your files being sold? Damn you. You've fudged up your online profile so badly dude.. I've been on the net for 1,2,3,4,5,6,7 - 7 years yet my profile is fine (Im a noooob xD) You've been on there for 2 And already you've earnt your name a bad reputation. I don't think you deserve to be named "The Phenomenal Ishz". Let go man Let it all go. Stop whinging Damn Im so tired Cya :wink: Edit: If you ever need a secure password, just ask me dude I'll give you dozens
  11. Re: [custom work]template for game engine Wow I seriosuly love your work I'm saving up some cash so I can hire you.. for the night xD Just kiddin :P
  12. Re: could someone check my game reallly quick... Woah I nearlly fell of my seat when I saw your site :lol: Buy a website firewall xD
  13. Re: Ajax Contact Form Yeah thanks.. I'm trying to find the site I would've had it up if I'd downloaded it from the authors site xD
  14. Hey dudes & dudettes Firstly, this is not mine. BUt it is open-source so I though this would be nice to share   ------------------------------------------------------------------------------------- 1. Create the following folders: img js scripts   2. Create a file called contact.htm in the root folder of your site   <!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>Contact Form</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript" src="js/functionAddEvent.js"></script> <script type="text/javascript" src="js/contact.js"></script> <script type="text/javascript" src="js/xmlHttp.js"></script> <style type='text/css' media='screen,projection'> <!-- body { margin:20px auto;width:600px;padding:20px;border:1px solid #ccc;background:#fff;font-family:georgia,times,serif; } fieldset { border:0;margin:0;padding:0; } label { display:block; } input.text,textarea { width:300px;font:12px/12px 'courier new',courier,monospace;color:#333;padding:3px;margin:1px 0;border:1px solid #ccc; } input.submit { padding:2px 5px;font:bold 12px/12px verdana,arial,sans-serif; } --> </style> </head> <body> <h2>Contact Form</h2> <p id="loadBar" style="display:none;"> [b]Sending Email.. Hold on just a sec…[/b] [img=img/loading.gif] </p> <p id="emailSuccess" style="display:none;"> <strong style="color:green;">Success! Your Email has been sent.[/b] </p> <div id="contactFormArea"> <form action="scripts/contact.php" method="post" id="cForm"> <fieldset> <label for="posName">Name:</label> <input class="text" type="text" size="25" name="posName" id="posName" /> <label for="posEmail">Email:</label> <input class="text" type="text" size="25" name="posEmail" id="posEmail" /> <label for="posRegard">Regarding:</label> <input class="text" type="text" size="25" name="posRegard" id="posRegard" /> <label for="posText">Message:</label> <textarea cols="50" rows="5" name="posText" id="posText"></textarea> <label for="selfCC"> <input type="checkbox" name="selfCC" id="selfCC" value="send" /> Send CC to self </label> <label> <input class="submit" type="submit" name="sendContactEmail" id="sendContactEmail" value=" Send Email " /> </label> </fieldset> </form> </div> </body> </html>   3. Create the following files in /scripts/ contact.php <?php // Change the 4 variables below $yourName = 'GradiDeck';// Change to your name $yourEmail = '[email protected]';// Change to site email $yourSubject = 'GradiDeck';//Change to Subject $referringPage = 'http://www.gradideck.co.uk/contact.php';//Change to referring page // No need to edit below unless you really want to. It's using a simple php mail() function. Use your own if you want function cleanPosUrl ($str) { return stripslashes($str); } if ( isset($_POST['sendContactEmail']) ) { $to = $yourEmail; $subject = $yourSubject.': '.$_POST['posRegard']; $message = cleanPosUrl($_POST['posText']); $headers = "From: ".cleanPosUrl($_POST['posName'])." <".$_POST['posEmail'].">\r\n"; $headers .= 'To: '.$yourName.' <'.$yourEmail.'>'."\r\n"; $mailit = mail($to,$subject,$message,$headers); if ( @$mailit ) { header('Location: '.$referringPage.'?success=true'); } else { header('Location: '.$referringPage.'?error=true'); } } ?>   xmlHttpRequest.php <?php // change the 4 variables below $yourName = 'GradiDeck';// Change to your name $yourEmail = '[email protected]';// Change to site email $yourSubject = 'GradiDeck';//Change to Subject $referringPage = 'http://www.gradideck.co.uk/contact.php';//Change to referring page // no need to change the rest unless you want to. You could add more error checking but I'm gonna do that later in the official release header('Content-Type: text/xml'); echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'; echo '<resultset>'; function cleanPosUrl ($str) { $nStr = $str; $nStr = str_replace("**am**","&",$nStr); $nStr = str_replace("**pl**","+",$nStr); $nStr = str_replace("**eq**","=",$nStr); return stripslashes($nStr); } if ( $_GET['contact'] == true && $_GET['xml'] == true && isset($_POST['posText']) ) { $to = $yourName; $subject = 'GradiDeck: '.cleanPosUrl($_POST['posRegard']); $message = cleanPosUrl($_POST['posText']); $headers = "From: ".cleanPosUrl($_POST['posName'])." <".cleanPosUrl($_POST['posEmail']).">\r\n"; $headers .= 'To: '.$yourName.' <'.$yourEmail.'>'."\r\n"; $mailit = mail($to,$subject,$message,$headers); if ( @$mailit ) { $posStatus = 'OK'; $posConfirmation = 'Success! Your Email has been sent. I will get back to you as soon as possible. Hope you enjoyed your stay. Note: If you selected to have a copy sent to yourself, the email may appear unsafe or as junk.'; } else { $posStatus = 'NOTOK'; $posConfirmation = 'Your Email could not be sent. Please try back at another time.'; } if ( $_POST['selfCC'] == 'send' ) { $ccEmail = cleanPosUrl($_POST['posEmail']); @mail($ccEmail,$subject,$message,"From: Yourself <".$ccEmail.">\r\nTo: Yourself"); } echo ' <status>'.$posStatus.'</status> <confirmation>'.$posConfirmation.'</confirmation> <regarding>'.cleanPosUrl($_POST['posRegard']).'</regarding> '; } echo' </resultset>'; ?>   *Change the 4 variables in each file! 4. Create the following files in /js/ contact.js function validateFields() { var frmEl = document.getElementById('cForm'); var posName = document.getElementById('posName'); var posEmail = document.getElementById('posEmail'); var posRegard = document.getElementById('posRegard'); var posText = document.getElementById('posText'); var strCC = document.getElementById('selfCC'); var whiteSpace = /^[\s]+$/; if ( posText.value == '' || whiteSpace.test(posText.value) ) { alert("You're trying to send an Empty Email. Please type something and then get on your way. Spam filters enabled"); } else if ( posEmail.value == '' && strCC.checked == true ) { alert("Why are you trying to CC yourself without an email?"); alert("Just for that..."); alert("I\'m clearing all the fields!"); frmEl.reset(); alert("There. Satisified."); alert("Now start over!"); posName.focus(); } else { sendPosEmail(); } } function sendPosEmail () { var success = document.getElementById('emailSuccess'); var posName = document.getElementById('posName'); var posEmail = document.getElementById('posEmail'); var posRegard = document.getElementById('posRegard'); var posText = document.getElementById('posText'); var strCC = document.getElementById('selfCC').value; var page = "scripts/xmlHttpRequest.php?contact=true&xml=true"; showContactTimer(); // quickly begin the load bar success.style.display = 'none'; // hide the success bar (incase this is a multi-email // convert (&, +, =) to string equivs. Needed so URL encoded POST won't choke. var str1 = posName.value; str1 = str1.replace(/&/g,"**am**"); str1 = str1.replace(/=/g,"**eq**"); str1 = str1.replace(/\+/g,"**pl**"); var str2 = posEmail.value; str2 = str2.replace(/&/g,"**am**"); str2 = str2.replace(/=/g,"**eq**"); str2 = str2.replace(/\+/g,"**pl**"); var str3 = posRegard.value; str3 = str3.replace(/&/g,"**am**"); str3 = str3.replace(/=/g,"**eq**"); str3 = str3.replace(/\+/g,"**pl**"); var str4 = posText.value; str4 = str4.replace(/&/g,"**am**"); str4 = str4.replace(/=/g,"**eq**"); str4 = str4.replace(/\+/g,"**pl**"); var stuff = "selfCC="+strCC+"&posName="+str1+"&posEmail="+str2+"&posRegard="+str3+"&posText="+str4; loadXMLPosDoc(page,stuff) } function showContactTimer () { var loader = document.getElementById('loadBar'); loader.style.display = 'block'; sentTimer = setTimeout("hideContactTimer()",6000); } function hideContactTimer () { var loader = document.getElementById('loadBar'); var success = document.getElementById('emailSuccess'); var fieldArea = document.getElementById('contactFormArea'); var inputs = fieldArea.getElementsByTagName('input'); var inputsLen = inputs.length; var tAreas = fieldArea.getElementsByTagName('textarea'); var tAreasLen = tAreas.length; // Hide the load bar alas! Done Loading loader.style.display = "none"; success.style.display = "block"; success.innerHTML = '<strong style="color:green;">'+grabPosXML("confirmation")+'[/b]'; // Now Hijack the form elements for ( i=0;i<inputsLen;i++ ) { if ( inputs[i].getAttribute('type') == 'text' ) { inputs[i].value = ''; } } for ( j=0;j<tAreasLen;j++ ) { tAreas[j].value = ''; } } function ajaxContact() { var frmEl = document.getElementById('cForm'); addEvent(frmEl, 'submit', validateFields, false); frmEl.onsubmit = function() { return false; } } addEvent(window, 'load',ajaxContact, false);   functionAddEvent.js function addEvent(elm, evType, fn, useCapture) { if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if (elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); EventCache.add(elm, evType, fn); return r; } else { elm['on' + evType] = fn; } } function getEventSrc(e) { if (!e) e = window.event; if (e.originalTarget) return e.originalTarget; else if (e.srcElement) return e.srcElement; } function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } } var EventCache = function(){ var listEvents = []; return { listEvents : listEvents, add : function(node, sEventName, fHandler, bCapture){ listEvents.push(arguments); }, flush : function(){ var i, item; for(i = listEvents.length - 1; i >= 0; i = i - 1){ item = listEvents[i]; if(item[0].removeEventListener){ item[0].removeEventListener(item[1], item[2], item[3]); }; /* From this point on we need the event names to be prefixed with 'on" */ if(item[1].substring(0, 2) != "on"){ item[1] = "on" + item[1]; }; if(item[0].detachEvent){ item[0].detachEvent(item[1], item[2]); }; item[0][item[1]] = null; }; } }; }(); addEvent(window,'unload',EventCache.flush, false);   xmlHttp.js var pos; // variable for posting information function loadXMLPosDoc(url,posData) { // branch for native XMLHttpRequest object if (window.XMLHttpRequest) { pos = new XMLHttpRequest(); pos.onreadystatechange = processPosChange; pos.open("POST", url, false); pos.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); pos.send(posData); // branch for IE/Windows ActiveX version } else if (window.ActiveXObject) { pos = new ActiveXObject("Microsoft.XMLHTTP"); if (pos) { pos.onreadystatechange = processPosChange; pos.open("POST", url, false); pos.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); pos.send(posData); } } } function grabPosXML (tagName) { return pos.responseXML.documentElement.getElementsByTagName(tagName)[0].childNodes[0].nodeValue; } function processPosChange() { // page loaded "complete" if (pos.readyState == 4) { // page is "OK" if (pos.status == 200) { if ( grabPosXML("posStatus") == 'NOTOK' ) { alert('There were problems sending the email. Please check back in a couple minutes and try again'); } } } }   Thats all the files done Now to get the image, go to http://www.gradideck.co.uk/img/loading.gif - save it and upload it to /img/ on your site. Now go to mainmenu.php Find (may not be the entire thing) [url='logout.php']Logout[/url]   Add after [url='contact.htm']Logout[/url]   To add this to your login page, find the register link in the script - I don't recommend this! [url='register.php']Register[/url] After that add [url='contact.htm']Contact Us[/url]     To test it out: http://gradideck.co.uk/contact.htm If you use this, please support me by joining: http://sorcast.com =D
  15. Re: Problem with instaling V2 McCodes the db access details you put into the fields are incorrect dude.. learn to create and use databases
×
×
  • Create New...