Jump to content
MakeWebGames

Eternal

Members
  • Posts

    305
  • Joined

  • Last visited

Everything posted by Eternal

  1. Re: [mccode V2] Chat Mod NEW little update on this due to the users update failing. remove what i said from header and put this in chat.php <?PHP include "globals.php"; //start of chat $query3=sprintf("SELECT `uid` FROM `session_chat` WHERE `uid`='%d'", $ir['userid']); $result=$db->query($query3); //user is in chat if($db->num_rows($result)>0) { } else { $username = $ir['username']; $query4=sprintf("INSERT INTO `session_chat`(`uid`,`lastactive`,`name`) VALUES ('%d', '%d', '%s')", $ir['userid'], 'NOW()', $username); $db->query($query4); } //get chat name, text, color $query5=sprintf("SELECT `imgpath`,`color`,`textcolor`,`mute` FROM `chatusers` WHERE `uid`='%d'", $ir['userid']); $result=$db->query($query5); if($db->num_rows($result) !== 0) { $row = $db->fetch_row($result); $_SESSION['image'] = $row['imgpath']; //get image //if no image set to 0 if($_SESSION['image'] == '') { $_SESSION['image'] = 0; } $_SESSION['color'] = $row['color']; //get username color //if no color set to 0 if($_SESSION['color'] == '') { $_SESSION['color'] = 0; } $_SESSION['textcolor'] = $row['textcolor']; //get user text color //if no text color set to 0 if($_SESSION['textcolor'] == '') { $_SESSION['textcolor'] = 0; } $_SESSION['mute'] = $row['mute']; //check if user is able to type in chat //set to 0 so user can chat if($_SESSION['mute'] == '') { $_SESSION['mute'] = 0; } } //no chat session else { $_SESSION['image'] = 0; $_SESSION['color'] = 0; $_SESSION['mute'] = 0; $_SESSION['textcolor'] = 0; } //END OF CHAT ?> <script type='text/javascript'> // Constructor function textareaResizer(tdiv) { if (textareaResizer.htmlstyle == null) textareaResizer.htmlstyle = document.getElementsByTagName('html')[0].style; var ua = navigator.userAgent.toLowerCase(), name; switch (true) { case ua.indexOf('konqueror') >= 0: case ua.indexOf('opera') >= 0: case ua.charAt(ua.indexOf('msie') + 5) == 5: // IE5 return; break; }; var index = textareaResizer.instances.length; textareaResizer.instances[textareaResizer.instances.length] = this; var handle = document.createElement('span'); handle.className = 'chat-bar'; handle.innerHTML = 'Page Resizer'; handle.onmousedown = function(e) { textareaResizer.instances[index].listen(e); }; handle.onmouseover = function() { this.style.cursor = 'n-resize'; }; handle.onmouseout = function() { this.style.cursor = 'auto'; }; handle = tdiv.parentNode.insertBefore(handle, tdiv.nextSibling); handle.middle = Math.ceil(textareaResizer.findHeight(handle) / 2); this.handle = handle; this.tdiv = tdiv; this.index = index; this.minHeight = 50; }; // Static properties textareaResizer.isResizing = false; textareaResizer.instances = new Array; textareaResizer.htmlstyle = null; // Static methods textareaResizer.findPosY = function(obj) { var curtop = 0; if (obj.offsetParent) while (obj.offsetParent) { curtop += obj.offsetTop obj = obj.offsetParent; } else if (obj.y) curtop += obj.y; return curtop; }; textareaResizer.findHeight = function(element, recalc) { if (element.height && recalc != true) return element.height; else { if (element.style.height) element.height = parseInt(element.style.height); else { element.style.height = element.clientHeight + 'px'; element.height = parseInt(element.style.height); }; return element.height; } }; textareaResizer.pageY = function(e) { if (!e.pageY) return e.clientY + window.document.documentElement.scrollTop; else return e.pageY; }; // Methods textareaResizer.prototype.listen = function(e) { var handle = this.handle, index = this.index; textareaResizer.htmlstyle.cursor = 'n-resize'; textareaResizer.isResizing = true; handle.onmousedown = null; handle.onmouseup = function(e) { textareaResizer.instances[index].stopListening(e); }; window.document.onmouseup = function(e) { textareaResizer.instances[index].stopListening(e); }; window.document.onmousemove = function(e) { textareaResizer.instances[index].resize(e); }; }; textareaResizer.prototype.resize = function(e) { if (!e) var e = window.event; e.cancelBubble = true; var selection = document.selection; if (selection) selection.clear(); if (textareaResizer.isResizing) { var tdiv = this.tdiv, handle = this.handle, minHeight = this.minHeight; /* This next statement is: * Textarea height + * Desired change in height + * Half the size of the handle (so the cursor stays in the middle of it) */ var newHeight = textareaResizer.findHeight(tdiv, true) + textareaResizer.pageY(e) - textareaResizer.findPosY(handle) - handle.middle; if (newHeight < minHeight) newHeight = minHeight; tdiv.style.height = newHeight + 'px'; }; }; textareaResizer.prototype.stopListening = function(e) { var handle = this.handle, index = this.index; textareaResizer.htmlstyle.cursor = 'auto'; textareaResizer.isResizing = false; window.document.onmousemove = null; window.document.onmouseup = null; handle.onmouseup = null; handle.onmousedown = function(e) { textareaResizer.instances[index].listen(e); }; }; </script> <style type="text/css"> input, textarea { font-family: courier new; font-size: 12px; background: black; } #content { width:500px; text-align:center; margin-left:25px; } #chatwindow { border:1px solid #0000CC; padding:4px; color:#CCCC99; width: 490px; height:552px; background: black; font-family: sans-serif; font-size: 14px; text-align:left; } #chatwindow a { font-family: sans-serif; padding-top: 1px; } .admin { color: #DB1900; font-weight: bold; } #chatnick { border: none; color:#FFCC00; border-bottom:1px solid #aaaaaa; padding:0px;} #chatmsg { border: none; color:#FFCC00; border-bottom:1px solid #0000CC; padding:4px;} #current_users { border: 1px solid #0000CC; padding:3px 3px 0px 3px; margin-top:3px; width: 475px; margin-left:auto; margin-right:auto; text-align:center; } #ch_input { border: 1px solid #0000CC; padding:3px 3px 0px 3px; margin-top:3px; width: 475px; margin-left:auto; margin-right:auto; text-align:center; } #ch_input2 { border: 1px solid #0000CC; padding:3px 3px 0px 3px; margin-top:3px; width: 475px; margin-left:auto; margin-right:auto; text-align:center; } .chat-bar { height: 3px; background: #0000CC; width: 300px; } </style> </head> <body> <div id="info"> <table border="0"> <tr> </tr> </table> </div> <div id="content"> <center><div id="chatwindow">Load</div></center><?php if($_SESSION['mute']==1){ echo "You can't speak in chat.";}?> <div id="ch_input"> <input id="chatck" type="text" size="1" maxlength="100" style="display:none" value="<?=$userid ?>"> <input id="chatnick" type="text" size="1" maxlength="18" style="display:none" value="<?=$userid ?>"> <input id="chatmsg" type="text" size="59" maxlength="116" onkeyup="keyup(event.keyCode);"> <input type="button" value="send" onclick="submit_msg();" style="color: #CCCC99; cursor:pointer;border:2px solid #470101;"> </center> </div><center> [url='javascript:add_smile( ":)" )'][img=chat/smiles/smile.gif][/url] [url='javascript:add_smile( ":D" )'][img=chat/smiles/ddd.gif][/url] [url='javascript:add_smile( ":hi:" )'][img=chat/smiles/hi.gif][/url] [url='javascript:add_smile( ";)" )'][img=chat/smiles/wink.gif][/url] [url='javascript:add_smile( ":assassin:" )'][img=chat/smiles/assassin.gif][/url] [url='javascript:add_smile( ":no:" )'][img=chat/smiles/no.gif][/url] [url='javascript:add_smile( ":yes:" )'][img=chat/smiles/yes.gif][/url] [url='javascript:add_smile( ":thank_you:" )'][img=chat/smiles/thank_you.gif][/url] [url='javascript:add_smile( ":vamp:" )'][img=chat/smiles/vamp.gif][/url] [url='javascript:add_smile( ":aggressive:" )'][img=chat/smiles/aggressive.gif][/url] [url='javascript:add_smile( ":smoke:" )'][img=chat/smiles/smoke.gif][/url] [url='javascript:add_smile( ":evil:" )'][img=chat/smiles/evil.gif][/url] [url='javascript:add_smile( ":not_know:" )'][img=chat/smiles/not_know.gif][/url] [url='javascript:add_smile( ":dash:" )'][img=chat/smiles/dash.gif][/url] [url='javascript:add_smile( ":dance:" )'][img=chat/smiles/dance.gif][/url] [url='javascript:add_smile( ":cry:" )'][img=chat/smiles/cry.gif][/url] [url='javascript:add_smile( ":order:" )'][img=chat/smiles/order.gif][/url] [url='javascript:add_smile( ":rofl:" )'][img=chat/smiles/rofl.gif][/url] [url='javascript:add_smile( ":shok:" )'][img=chat/smiles/shok.gif][/url] [url='javascript:add_smile( ":skull:" )'][img=chat/smiles/skull.gif][/url] [url='javascript:add_smile( ":sorry:" )'][img=chat/smiles/sorry.gif][/url] [url='javascript:add_smile( ":stop:" )'][img=chat/smiles/stop.gif][/url] </center> <script language='javascript' type='text/javascript'> function add_smile( smile ) { document.getElementById('chatmsg').value = document.getElementById('chatmsg').value + ' ' + smile + ' '; } </script> <center> <font color="white">Smiles</font> </center> <center> <font color="white">Now in chat</font> </center> <div id="current_users"> </div> </div> <script type="text/javascript"> var nick_maxlength=18; var http_request=false; var http_request2=false; var http_request3=false; var intUpdate; var whoUpdate; var whoSubmit; var linescount; //this.document.getElementById('chatwindow').style.height=500; /* reading */ function ajax_request(url){ //alert('method1'); //alert(url); http_request=false;if(window.XMLHttpRequest){ http_request=new XMLHttpRequest(); if(http_request.overrideMimeType){ http_request.overrideMimeType('text/xml'); } }else if(window.ActiveXObject){ try{http_request=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e){ try{http_request=new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){} } } if(!http_request){ alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } //alert(url); http_request.onreadystatechange=alertContents;http_request.open('GET',url,true); http_request.send(null); } function alertContents(){if(http_request.readyState==4){if(http_request.status==200){rec_response(http_request.responseText);}else{}}} /* writing */ function ajax_request2(url){ //alert('method2'); //alert(url); http_request2=false;if(window.XMLHttpRequest){http_request2=new XMLHttpRequest();if(http_request2.overrideMimeType){http_request2.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{http_request2=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request2=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}} if(!http_request2){alert('Giving up :( Cannot create an XMLHTTP instance');return false;} http_request2.onreadystatechange=alertContents2;http_request2.open('GET',url,true);http_request2.send(null);} function alertContents2(){if(http_request2.readyState==4){if(http_request2.status==200){rec_chatcontent(http_request2.responseText);}else{}}} /* whobox update */ function ajax_request3(url){ //alert('method3'); //alert(url); http_request3=false;if(window.XMLHttpRequest){http_request3=new XMLHttpRequest();if(http_request3.overrideMimeType){http_request3.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{http_request3=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request3=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}} if(!http_request3){alert('Giving up :( Cannot create an XMLHTTP instance');return false;} http_request3.onreadystatechange=alertContents3;http_request3.open('GET',url,true);http_request3.send(null);} function alertContents3(){ if(http_request3.readyState==4){ if(http_request3.status==200){ rec_whocontent(http_request3.responseText); }else{ window.setTimeout("alertContents3", "350"); } } } /* chat stuff */ var show_newmsg_on_bottom=1; /* set to 0 to let new msg?s appear on top */ var waittime=1150; /* time between chat refreshes (ms) */ var whotime=4000; function alr(){ alert(this.document.getElementById('chatwindow').innerHTML); } this.document.getElementById('chatwindow').innerHTML = "Loading..."; this.document.getElementById('current_users').innerHTML = "Loading..."; intUpdate=window.setTimeout("read_cont();", waittime); whoUpdate=window.setTimeout("read_users();", whotime); whoSubmit=window.setTimeout("submit_who();", whotime); function read_users() { zeit2 = new Date(); ms2 = (zeit2.getHours() * 24 * 60 * 1000) + (zeit2.getMinutes() * 60 * 1000) + (zeit2.getSeconds() * 1000) + zeit2.getMilliseconds(); ajax_request3("chat/back.php?action=users&x=" + ms2); } function read_cont() { if(this.document.getElementById('chatwindow').style.height!=''){ string=this.document.getElementById('chatwindow').style.height; stl=string.length; ste=string.length-2; linescount=string.substring(0,ste); linescount=linescount/30; linescount=Math.round(linescount); }else{ linescount=25; } mils = new Date(); ms = mils.getMilliseconds(); ajax_request2("chat/back.php?action=read&sessid=<?php echo $ir['userid']; ?>&x=" + ms +'&linescount='+linescount); } function display_msg(msg1) { document.getElementById('chatwindow').innerHTML ='';document.getElementById('chatwindow').innerHTML = msg1.substr(0,msg1.length - 1); } function display_who(msg2) { document.getElementById('current_users').innerHTML = msg2.substr(0,msg2.length -1); } function keyup(arg1) { if (arg1 == 13) submit_msg(); } function submit_who() { document.getElementById('chatnick').value = "<?=$userid ?>"; //write_who(document.getElementById('chatnick').value); whoUpdate=window.setTimeout("submit_who();", whotime); } function submit_msg() { clearTimeout(intUpdate); document.getElementById('chatnick').value = "<?=$userid ?>"; document.getElementById('chatck').value = "<?=$userid ?>"; spaces=""; for(i=0;i<(nick_maxlength-document.getElementById('chatnick').value.length);i++) spaces+=" "; v=document.getElementById('chatwindow').innerHTML.substring( document.getElementById('chatwindow').innerHTML.indexOf("\n")) + "\n" + document.getElementById('chatnick').value + spaces + "| " + document.getElementById('chatmsg').value; if (document.getElementById('chatmsg').value != "") { document.getElementById('chatwindow').value=v.substring(1); var chmsg=document.getElementById('chatmsg').value; var chnik=document.getElementById('chatnick').value; var chck=document.getElementById('chatck').value; write_msg(chmsg,chnik,chck); } document.getElementById('chatmsg').value=""; intUpdate=window.setTimeout("read_cont();", waittime); } function write_msg(msg1,nick1,ck) { if(this.document.getElementById('chatwindow').style.height!=''){ string=this.document.getElementById('chatwindow').style.height; stl=string.length; ste=string.length-2; linescount=string.substring(0,ste); linescount=linescount/30; linescount=Math.round(linescount); }else{ linescount=16; } <?php if($_SESSION['mute']==1){ }else{ ?> ajax_request("chat/back.php?action=write&sessid=<?PHP echo $userid;?>&textcolor=<?PHP echo $_SESSION['textcolor'];?>&profid=<?PHP echo $userid; ?>&uname=<?PHP echo $ir['username']; ?>&image=<?PHP echo $_SESSION['image']; ?>&color=<?PHP echo $_SESSION['color']; ?>&rmdays=<?PHP echo $ir['donatordays']; ?>&m=" + escape(msg1)+'&linescount='+linescount); <?PHP } ?> } function rec_response(str1) { } function rec_chatcontent(cont1) { if (cont1 != "") { out1 = unescape(cont1); if (show_newmsg_on_bottom == 0) { out1 = ""; while (cont1.indexOf("\n") > -1) { out1 = cont1.substr(0, cont1.indexOf("\n")) + "\n" + out1; cont1 = cont1.substr(cont1.indexOf("\n") + 1); out1 = unescape(out1); } } if (document.getElementById('chatwindow').innerHTML != out1) { display_msg(out1); } intUpdate=window.setTimeout("read_cont()", waittime); } } function rec_whocontent(cont2) { if (cont2 != "") { document.getElementById('current_users').innerHTML = cont2; whoUpdate=window.setTimeout("read_users()", whotime); } } new textareaResizer( document.getElementById('chatwindow') ); </script> <?PHP $h->endpage(); ?>   Fully tested seen working on http://www.deadlyghetto.net/chat.php As for smileys find your own i haven't yet added in smileys only the coding if i was to put this as a working script
  2. Re: [mccode V2] Chat Mod NEW A basic example using the original mccodes header file on how it should be placed...   <?php class headers { function startheaders() { global $ir, $set; echo <<<EOF <!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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-color: #DEDEDE; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: black; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: black; } .table2 { } .lgrad { background-image:url(lgrad.jpg); background-repeat:repeat-y; width:19px; } .linegrad { background-image:url(linegrad.PNG); background-repeat:repeat-y; background-align: center; width:2px; } .rgrad { background-image:url(rgrad.jpg); background-repeat:repeat-y; width:19px; } .dgrad { background-image:url(dgrad.jpg); background-repeat:repeat-x; height:38px; } .dgradl { background-image:url(dgradl.jpg); background-repeat:no-repeat; height:38px; width:38px; } .dgradr { background-image:url(dgradr.jpg); background-repeat:no-repeat; height:38px; width:38px; } .center { width:932px; background-color:#FFFFFF; vertical-align:top; text-align:center; } .table { background-color:#000000; } .table3 { background-color:#000000; } .table td { background-color:#DEDEDE; height:22px; } .table3 td { background-color:#CCCCCC; } td .alt { background-color:#EEEEEE; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } --> </style></head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> EOF; //start of chat $blinki=$_SERVER['SCRIPT_NAME']; $checklinki1=explode('.',$blinki); $checklinki2=explode('/',$checklinki1[0]); if($checklinki2[1]=='chat') { $query3=sprintf("SELECT `uid` FROM `session_chat` WHERE `uid`='%d'", $ir['userid']); $result=$db->query($query3); //user is in chat if($db->num_rows($result)>0) { } else { $username = $ir['username']; $query4=sprintf("INSERT INTO `session_chat`(`uid`,`lastactive`,`name`) VALUES ('%d', '%d', '%s')", $ir['userid'], 'NOW()', $username); $db->query($query4); } } //get chat name, text, color $query5=sprintf("SELECT `imgpath`,`color`,`textcolor`,`mute` FROM `chatusers` WHERE `uid`='%d'", $ir['userid']); $result=$db->query($query5); if($db->num_rows($result) !== 0) { $row = $db->fetch_row($result); $_SESSION['image'] = $row['imgpath']; //get image //if no image set to 0 if($_SESSION['image'] == '') { $_SESSION['image'] = 0; } $_SESSION['color'] = $row['color']; //get username color //if no color set to 0 if($_SESSION['color'] == '') { $_SESSION['color'] = 0; } $_SESSION['textcolor'] = $row['textcolor']; //get user text color //if no text color set to 0 if($_SESSION['textcolor'] == '') { $_SESSION['textcolor'] = 0; } $_SESSION['mute'] = $row['mute']; //check if user is able to type in chat //set to 0 so user can chat if($_SESSION['mute'] == '') { $_SESSION['mute'] = 0; } } //no chat session else { $_SESSION['image'] = 0; $_SESSION['color'] = 0; $_SESSION['mute'] = 0; $_SESSION['textcolor'] = 0; } //END OF CHAT } function userdata($ir,$lv,$fm,$cm,$dosessh=1)
  3. Re: [any version] Removal of 1 minute crons also when picking a name try to make it not known like cron_min.php As direct access shows a few too many errors
  4. Re: Daily Donators Reward [Mccode v2] lawl i know you didn't xD But you keep on with your work
  5. Re: Daily Donators Reward [Mccode v2] you really think this is your mod? maybe you should check the forum I know you didn't do this killer :P an edit maybe ..
  6. Re: Mccodes V2 Request Name Changes add to global func or create a who.php file and insert <?php function nameFormat($id) { $query = mysql_query("SELECT userid,donatordays,username FROM `users` WHERE `userid` = '".$id."' LIMIT 1") or die(mysql_error()); $row = mysql_fetch_object($query); elseif( $row->userid == 1 ){$name="<img src=/images/image.gif border=0>";} elseif( $row->userid == 2){$name="<img src=/images/image.gif border=0>";} elseif( $row->userid == 3){$name="<img src=/images/image.png border=0>";} elseif( $row->userid == 4){$name="<font color= jade>name</font>";} elseif( $row->userid == 5){$name="<img src=/images/image.gif border=0>";} elseif( $row->userid == 6){$name="<img src=/images/image.png border=0>";} elseif($row->donatordays != 0){$name="<font color= #66ffff>".$row->username."</font>";} else{$name="<font color=white>".$row->username."</font>";} return "<a href=viewuser.php?u=".$row->userid.">$name</a>"; } ?> Then in each page replace the standard name calling to nameformat($r['userid']) // and $userid for your own pages you view :)
  7. Re: [MCCODES V2] Search Forums by Name will add more as i go along [WORKING] What if you add print "<h3>Forum Search</h3> [b]Search Forums by Word[/b]<form action='searchforumname.php' method='get'> <input type='text' name='name' /> <input type='submit' value='Search' />"; in the forums page so you could easily type in what you want from there. :)
  8. Re: Mccodes V2 Request Name Changes Lawl i got this on my game. http://www.deadlyghetto.net If that is what you talking about, How i can define images and colored variables.
  9. Re: google and your game what about this $IP = $_SERVER['REMOTE_ADDR']; if($IP == '66.249.64.47' OR $IP == '66.249.66.129') {echo '[url="gbot.php?username=googlebot&password=whatever"]login[/url]'; } Then in gbot.php have something simulating a user login attempt like $IP = $_SERVER['REMOTE_ADDR']; if($IP == '66.249.64.47' OR $IP == '66.249.66.129') { $username = $_GET['username']; $password =$_GET['password']; $uq=$db->query("SELECT userid FROM users WHERE login_name='".$username."' AND `userpass`=md5('".$password."')"); } else { header("Location: login.php"); } // Other details saying a successfull login then instead of header(); //Cause if you put a re-direct bots will cancel the sites veiwing... // put [url="index.php"]index[/url]   Since i herd google don't use javascript so it can't use a login page. That would be optimum for it to be included into your game. Then disable attacks and preferences from that user and not able to be attacked...
  10. Re: [mccode V2] Chat Mod NEW Lawl i forgot about this mod.   With this the error is not on that line but the query before it. You either didn't close it proper or missed something along those lines. If you could post up to line 129 would be helpfull on correcting this error.
  11. Re: [mccode all] sql backup I just done some more testing on a few hosting sites. You may want to ask your hosting provider to let you have exec or passthru Some hosting sites allow one or the other.,...
  12. Re: [McCodes] Duplicate IP block gee thanx karlos i forgot the $c :P
  13. Re: [MCCODES V2] Fully Customise your game layout     I tried this a little while back and the only people who could see the font was the people who had that font installed..
  14. Re: [McCodes] Duplicate IP block   $user_ip = $_SERVER['REMOTE_ADDR']; $_GET['ID'] = abs(@intval($_GET['ID'])); $select = sprintf("SELECT lastip FROM users WHERE ((lastip = '%s') OR (lastip_login = '%s') OR (lastip_signup = '%s') AND (userid = %u))", $user_ip, $user_ip, $user_ip, $_GET['ID']); $query = $db->query($select); if($db->num_rows($query) > 1) //Only one user should be found - you! { echo "Another account has been detected on your IP. As a result, sending to this person is prohibited"; $h->endpage(); exit; }   The one i done is for v1 I think that this could work for both versions $user_ip = $_SERVER['REMOTE_ADDR']; $_GET['ID'] = abs(@intval($_GET['ID'])); $select = sprintf("SELECT lastip FROM users WHERE ((lastip = '%s') OR (lastip_login = '%s') OR (lastip_signup = '%s') AND (userid = %u))", $user_ip, $user_ip, $user_ip, $_GET['ID']); $query = mysql_query($select); if(mysql_num_rows($query) > 1) //Only one user should be found - you! { echo "Another account has been detected on your IP. As a result, sending to this person is prohibited"; $h->endpage(); exit; } Cause mysql and $db-> isn't version orientated.
  15. Re: Dogdy bussines Lol I have nothing to be Guilty for. my login was based from that ninja site which i spoke to him about it a while ago... and the image that is there was my image that Iamwicked edited for me so it looked pretty,,,, As for this warsofsin i stored all the files i wrote for it in a seperate folder than the game files which i uploaded to the site. When i put up my site i just uploaded those files With my standard mccodes install So me saying i am over it means I don't have to explain anything to anyone and i don't care what anyone says I know what i am doing is right So any comments towards me i don't give a dam about....         * jus for the mods i tried so hard not to put any bad language in here :P
  16. Re: Dogdy bussines lol I am over it..............
  17. Re: [McCodes][v2] Staff Menu Mod (1st Mod ive made)   Why not just leave some good comments on this, Instead of some "but i won't be using this". Do we care if you using or not. I think this is the best staff menu//layout i have ever seen and this Dude knows his ability well.   +1 to you mate...
  18. Re: Dogdy bussines LawL, First of all my game isn't a backup of Warsofsin.com Warsofsin.com is using the modifications i either found on CE or made my self. No-one that is part of warsofsin.com can code So me using their files is thrown out the window I own a legal copy of mccodes and all i did was place the structure i was using on warsofsin to put on deadlyghett.com/.net Since then i have re-coded everything.. So on this debate... Iamwicked says " i held out on the donations and that" that is correct but since when did he put anything towards the site? Other than letting me host it. The deal he said was we both be 50/50 owners and we share the cash... Which he changed the paypal to his And never put anything into the game..   So think what you want... It doesn't matter to me I will keep doing what i always done And you will be the ones thinking on what i am going to do next.... I feel like some kinda super hero :mrgreen:   Get past the fact of this and worry about your own <censored>..
  19. Re: Strange Ip problem Umm Hi , I got told this will show the person behind the proxy? i tried this formular and it returned IP Hostname Last Hit 67.159.56.82 fsck.y-0-u.org Last Login 67.159.56.82 fsck.y-0-u.org That is no where near my real ip.... or ISP ip..... Is there some sort of trick to this that you know and i don't?
  20. Re: [McCodes] Duplicate IP block I was browsing proxie scripts and i found some sort of a prevention script.. I know aol is classed as a proxie i haven't got that far to determine the proxie servers aol uses.... Store this in your .ht access file in root directory.. RewriteEngine on RewriteCond %{HTTP:VIA} !^$ [OR] RewriteCond %{HTTP:FORWARDED} !^$ [OR] RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR] RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR] RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR] RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR] RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR] RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$ RewriteRule ^(.*)$ - [F] to Allow a ip/ proxie use this :) RewriteCond %{HTTP_REFERER} !.*allowedproxydomain.com.*
  21. Re: [Mccodes V2] Set Up V2 the way you want it without altering files.... So in basic context you have gone through every file and set the $ sign to be eg.. fetch from settings and a set of conf values to define this. like brave = $set['brave'] don't get me wrong but couldn't anyone do this if you provided the sql and variables on a standard base. You don't have to do a fresh install either, Just means taking a day to edit every file... Nice though "Different!!"
  22. Re: Shoutbox Ban - Not Finished - Dont Post   function user_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; }   User: ".user_dropdown($c,'user')."
  23. Re: [McCodes]No right click script Maybe if you encrypt your source with a php obfuscation program That would be the best copycat avoider And setting a no download images in your .HT ACCESS file.
  24. Re: Shoutbox Ban - Not Finished - Dont Post Why does one dis-respect the laws of Grammar. A little correction on how i would like to see my script....   function shoutban_user_form() { global $db,$ir,$c,$h,$userid; print "<h3>Shoutbox Banning</h3> The user will not be able to Comment in the shout box. <form action='staff_punit.php?action=shoutsub' method='post'> User: ".user_dropdown($c,'user',$_GET['XID'])." Days: <input type='text' name='days' /> Reason: <input type='text' name='reason' /> <input type='submit' value='Shout Ban User' /></form>"; } function shoutban_user_submit() { global $db,$ir,$c,$h,$userid; $re=$db->query("UPDATE users SET shoutban=1 WHERE userid={$_POST['user']}"); if($db->affected_rows()) { $db->query("INSERT INTO shoutban VALUES('',{$_POST['user']},{$_POST['days']},'". $_POST['reason']."')"); } print "User banned from Shoutbox."; stafflog_add("{$ir['username']} banned ID {$_POST['user']} for {$_POST['days']}"); } function unsb_user_form() { global $db,$ir,$c,$h,$userid; print "<h3>Unban user from shout box</h3> This user wil be able to comment in the shout box. <form action='staff_punit.php?action=unshoutsub' method='post'> User: ".sb_user_dropdown($c,'user')." <input type='submit' value='Un-shout Ban User' /></form>"; } function unsb_user_submit() { global $db,$ir,$c,$h,$userid; $db->query("UPDATE users SET shoutban=0 WHERE userid={$_POST['user']}"); $db->query("DELETE FROM shoutban WHERE sb_userid={$_POST['user']}"); print "User un-shoutbanned."; stafflog_add("Un-shout baned user ID {$_POST['user']}"); }
  25. Re: [v2]User Competitions[v2]   Want us to hold your hand as well? Why can't you fix the errors?
×
×
  • Create New...