Jump to content
MakeWebGames

Eternal

Members
  • Posts

    305
  • Joined

  • Last visited

Everything posted by Eternal

  1. Re: IPN Issue? The only Problem i have found with IPN is that when a Purchase has been made it isn't credited cause the payment hasn't processed If you take a look and change the values to 1 cent per donation it will credit auto meaning it is a call back from paypal that tells the script that the purchase is valid // processed You might be on a free paypal account where you have to verify each donation ....
  2. Re: Mod Request Why not just create a field in the gangs OR ladder table called war_hits then in attack pages where you have the +1 and so for gang respect Put +1 for hits also adding on gang war end like surrender put update gangs set war_hits =0   It is simple...
  3. Re: Brave goes to minus Close your game... Take a few hours to understand the workings of php...   If something is going minus it is cause you are allowing it.. Either Your not checking the outcome of a modification... checking if the user has that brave to start with before that initial query is processed..
  4. Re: [mccode] 8 Lines to secure your site from known sql injections. notice this script is for url injections??? But with some tinkering about i am sure you could clean each post and get variable.. And yes that will screw the bbcode around.
  5. Re: [mccode v2] Attack :) I don't see any problems with my script.. Yes there is a little issue which i am going to post soon... but no errors as of yet i know about.. Your error seems that you have something before the php tag at the top or on your header page..
  6. Re: [v2] Donator Only Shop I was on msn to this dude while he was writing it asking for a little advice.. So i know that this is his mod and i never seen a mod like this done
  7. Re: [mccode] 8 Lines to secure your site from known sql injections.     Ok after i read this post i went and tested this against other ones i came across.. My site never slowed down at any pace.. bbcode Never had a problem with this .. i don't know where you get this from if it is an assumption or you have tried it first hand? But it seems to work with url manipulation towards sql injections... I know it won't stop anything But against the ones that drop tables it will...
  8. Re: [mccode] 8 Lines to secure your site from known sql injections.   you dont wona do that Wana explain to me why then?
  9. Re: "if location =" ... query Must be a problem with your explore page other than that query....
  10. Re: "if location =" ... query * Note: This is only a base template take the query and Put is suited into your explore.... <?php include "globals.php"; $tresder=(int) rand(100,999); if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } print "<center>[b] Below you will find many useful links.[/b] </br> <table> <table width=75% border='1'> <tr height=100 valign=top> <td valign=top width=33%><center>[b]Station Center[/b]</center><hr color='#2E8B57'> <center>[url='cbank.php']Crystal Bank[/url]</center> <center>[url='estate.php']Estate Agent[/url]</center> <center>[url='monorail.php']Travel Agency[/url]</center> <center>[url='bank.php']City Bank[/url]</center> "; $q=$db->query("SELECT * FROM shops WHERE shopLOCATION={$ir['location']}"); while($r=$db->fetch_row($q)) { print "[url='shops.php?shop={$r[']{$r['shopNAME']}[/url] "; } echo" <center>[url='cyberbank.php']Cyber Bank[/url] <td valign=top width=33%><center>[b]Market Place[/b]</center><hr color='#2E8B57'> //rest of explore here
  11. Re: [mccode] 8 Lines to secure your site from known sql injections. i am no pro at this but why not use some sort of a logging system to do this.. $ids_checkpost=urldecode($_SERVER['QUERY_STRING']); if(eregi("[\'|'/'\''<'>'*'~'`']",$ids_checkpost) || strstr($ids_checkpost,'union') || strstr($ids_checkpost,'java') || strstr($ids_checkpost,'script') || strstr($ids_checkpost,'substring(') || strstr($ids_checkpost,'ord()')){ $passed=0; echo "<center>:Hack attempt:</center>"; // or blank so they not know they failed.. event_add(1,"<font color=red>".$ir['username']."</font> [b] Tried to use [".$_SERVER['SCRIPT_NAME']."{$ids_checkpost}].. ",$c); $h->endpage(); // i use a nameformat($i['userid']); that has the <ahref" blah included.... exit; }
  12. I am getting in the stats of players only on one person at moment but it says ADDRESS HOSTNAME 1.1.1.1,2.2.2.2 N/A I have search places to find out how that is shown And it is two separate ip address's   What can be going wrong or is that person using some sort of application or so?
  13. Re: [mccode v2] Attack :) Thanx i know this mod has a few bugs... But as i said i am working on a newer more advanced one ... Just in due time will it apear here If it does..
  14. Re: [mccode V2] Search Islands   you got a link? He aint got a game... I have asked him a few times...
  15. Re: [mccode] 8 Lines to secure your site from known sql injections. LOL   I actually feel the same way. I was stuck on something and asked for a little help on the irc channel for this. And all i got back is "TRY IT" i know she isn't here to help us but as such quality she Says she is one would think to go to her for a little advice. I think yes she is wasting her talent but, I wouldn't wana help everyone when i got things to do.. And yes the "learn it " comment is a good answer but if someone not knows whats going wrong how can they learn it? There is thousands of possible PHP functions out there that can control things. Even a hint would be good.....   But i took her advice and never asked anyone of her Status ever again....
  16. Re: [mccodes v2] Awsome cron help [TIMESTAMP] What exactly are you wanting help with on the crons mate?
  17. Re: [mccode V2] Search Islands   Nah i ain't posting it xD haha LOL and because i dont want to post the one i done maybee somethink else i do insted! I don't know about Crazy-t i speak to him on msn all the time and he asks me about simple querys and i am only 5 months old in this my self but he boasts about how he always has something better than us like his ajax chat javascript.... and now this.... I think my chat is almost as advanced as you can get it .. If you can get better than prove it...   As for this one i know That you can do better than this cause it is a simple mod and took me all of 2 mins to write it up... So i say again if you can do better prove it
  18. Re: gym exp where it says $gain=round(rand(1,3)/rand(700,800)*rand(700,800)*(($ir['will']+20)/200)); In that section put $egain=$gain/30; then add to the query ,exp=exp+$egain   Modify to your liking....
  19. I recently took up an offer from Iamwicked to go on one of his hosting accounts for free which was ok. I jumped into it pretty quickly but in the end his hosting prevented me from putting forward a few Mods due to safe mode restrictions. So i go and get paid hosting with these options available and moved the game from iamwicked to new site Yet to discover the little kid now wants to file charges against me for deleting my game files from there. What gets me is that i go on to bluehost hosting with another project and they don't steal my codes/ threaten to file charges Yet this little kid thinks he can!! ???
  20. Re: [mccode V2] Chat Mod NEW
  21. Re: [mccode V2] Chat Mod NEW At the moment i haven't coded the staff panel bit where you assign the user either png name color name and text color..
  22. Re: [mccode V2] Chat Mod NEW Creat folder chat then in that folder place back.php ~~~> <?php session_start(); ob_start(); if(get_magic_quotes_gpc() == 0) { foreach($_POST as $k => $v) { $_POST[$k]=addslashes($v); } foreach($_GET as $k => $v) { $_GET[$k]=addslashes($v); } } require "../global_func.php"; if($_SESSION['loggedin']==0) { header("Location: ../login.php");exit; } $userid=$_SESSION['userid']; include "../config.php"; global $_CONFIG; define("MONO_ON", 1); require "../class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } header("expires: mon, 26 jul 1997 05:00:00 gmt"); //???? ? ??????? header("cache-control: no-cache, must-revalidate"); // http/1.1 header("pragma: no-cache"); // http/1.1 header("last-modified: ".gmdate("d, d m y h:i:s")."gmt"); //Action - return text to chat window //Limit chat text file to 25 lines function limitChat() { $file = file('../chat.txt'); $count = count($file); if($count >= 25) { $f2 = fopen('../chat.txt', 'w+'); $i=0; while($i <= 25 ) { $write[] = array_pop($file); $i++; } $write = array_reverse($write); foreach($write as $w) { fwrite($f2,$w); } fclose($f2); } } //END OF CHAT FILE TEXT LINE LIMIT //Read line if($_GET['action']=='read') { limitChat(); $file = file('../chat.txt'); $num = $_GET['linescount']; if(!isset($num)) { $num = 20; } $c = count($file); $str = ''; if($c>$num) { $c1 = $c - $num; for($i = $c1; $i < $c; $i++) { echo $file[$i]; } } else { foreach($file as $k=>$v) { echo $v; } } //echo $_GET['sessid']; //There be update databese by date :) mysql_query("UPDATE session_chat SET lastactive=".time()." WHERE uid=".$userid.""); $query3=sprintf("SELECT `uid` FROM `session_chat` WHERE `uid`='%d'", $userid); $result=mysql_query($query3); if(mysql_num_rows($result)>0) { } else { $result = mysql_query('SELECT * FROM users WHERE userid='.$userid.''); $q = mysql_fetch_array($result); $query4=sprintf("INSERT INTO `session_chat`(`uid`,`lastactive`,`name`) VALUES ('%d', '%d', '%s')", $userid, 'NOW()', $q['username']); mysql_query($query4); } } //Write to text file if($_GET['action']=='write') { $time = date(G.":".i,time()); if($_GET['color']==0 && $_GET['image']==0) { //$ucl = new User($_GET['profid']); $result = mysql_query('SELECT * FROM users WHERE userid='.$userid.''); $r = mysql_fetch_array($result); $link = '[url="viewuser.php?u='.$r['userid'].'"]'.$r['username'].'[/url] '; } //Set user color if($_GET['color']!='0' && $_GET['color']!='') { $link = '[url="viewuser.php?u='.$_GET['profid'].'"]<font color='.$_GET['color'].'>'.$_GET['uname'].'</font>[/url]<font color='.$_GET['textcolor'].'> '; } //Get user image if($_GET['image']!='0' && $_GET['image']!='') { $link = '[url="viewuser.php?u='.$_GET['profid'].'"][img='.$_GET['image'].'][/url] '; } $m.=urldecode($_GET['m']); $smiles = array( ':)', ':D', ':hi:', ';)', ':assassin:', ':no:', ':yes:', ':thank_you:', ':vamp:', ':aggressive:', ':smoke:', ':evil:', ':not_know:', ':dash:', ':dance:', ':cry:', ':order:', ':rofl:', ':shok:', ':skull:', ':sorry:', ':stop:' ); $images=array( '[img=chat/smiles/smile.gif]', '[img=chat/smiles/ddd.gif]', '[img=chat/smiles/hi.gif]', '[img=chat/smiles/wink.gif]', '[img=chat/smiles/assassin.gif]', '[img=chat/smiles/no.gif]', '[img=chat/smiles/yes.gif]', '[img=chat/smiles/thank_you.gif]', '[img=chat/smiles/vamp.gif]', '[img=chat/smiles/aggressive.gif]', '[img=chat/smiles/smoke.gif]', '[img=chat/smiles/evil.gif]', '[img=chat/smiles/not_know.gif]', '[img=chat/smiles/dash.gif]', '[img=chat/smiles/dance.gif]', '[img=chat/smiles/cry.gif]', '[img=chat/smiles/order.gif]', '[img=chat/smiles/rofl.gif]', '[img=chat/smiles/shok.gif]', '[img=chat/smiles/skull.gif]', '[img=chat/smiles/sorry.gif]', '[img=chat/smiles/stop.gif]' ); $html = array('', '<', '>'); $m = str_replace($html,"",$m); $m = str_replace($smiles, $images, $m); $m = str_replace("\'", "'", $m); $m = str_replace('\"', '"', $m); $m.='</font> '; if(substr($m,0,3)=='/me') { $m = str_replace('/me', $link, $m); if($_GET['textcolor']!='') { $m='<p style="display:inline;color:#'.$_GET['textcolor'].'">'.$m.'</p>'; } $ot = '<font color="grey" size="1">'.$time.'</font> '.$m; } else { if($_GET['textcolor']!='') { $m='<p style="display:inline;color='.$_GET['textcolor'].'">'.$m.'</p>'; } $ot = '<font color="grey" size="1">'.$time.'</font> '.$link.'- '.$m; } $f=fopen('../chat.txt','a+'); fwrite($f,"\r\n"); fwrite($f,$ot); fclose($f); } //Get users in chat if($_GET['action']=='users') { $result = mysql_query('SELECT * FROM session_chat ORDER BY uid'); $last = mysql_fetch_array(mysql_query("SELECT MAX(uid) as uid FROM session_chat")); $last = $last['uid']; while($row=mysql_fetch_array($result)) { //$ucl = new User($row['uid']); if($row['uid'] != $last) { echo '[url="viewuser.php?u='.$row['uid'].'"]'.$row['name'].'[/url]<font color="white">,</font> '; } else { echo '[url="viewuser.php?u='.$row['uid'].'"]'.$row['name'].'[/url] &nbsp'; } } } ?>   Then in header.php you will need to place this at top under your style section. basicly at the TOP //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
  23. CREATE TABLE IF NOT EXISTS `chatusers` ( `uid` int(11) NOT NULL, `imgpath` text NOT NULL, `color` text NOT NULL, `textcolor` text NOT NULL, `mute` int(11) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS `session_chat` ( `uid` int(11) NOT NULL, `lastactive` int(11) NOT NULL, `name` text NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; You will need to edit the smileys in these scripts to suit what ever you like create chat.txt and chmod it to 7 7 7 or 7 5 5 as you wish in root directory create chat.php store in root directory <?PHP include "globals.php"; ?> <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(); ?>
  24. Re: V2 Viewuser It is a nice beginner mod. Also you would need to place the sig part below the Staff comment box otherwise if i come in and put a 300 line sig it will be messed around..
  25. Re: v2 Mine Mod if($ir['power'] < 10){ print "<center>You need 10 power to mine here, you have {$ir['power']}</center>"; exit; } You thought about posting the whole script and sql?? This is from V1 so you will need ALTER users ADD `power` INT(11) You need the whole list of sqls that go with this!!!!
×
×
  • Create New...