
Eternal
Members-
Posts
305 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Eternal
-
Re: [mccode] another sql protection to help lol As it has been noted before there isn't much of a way to secure a site from sql injections.. All that can be said is secure every input, GET's , POST's and help prevent it . most people use mysql_real_escape_string($content); or mysql_real_escape_string(strip_tags($content)); just To cut down on user inputs... Also this /*+++++++++++++++++++++++++++++++++++++*/ /* SQL Protection Start */ /*+++++++++++++++++++++++++++++++++++++*/ //check if incomingData is not empty and of the expected length function checkIncomingData($idata, $minsize, $maxsize) { if ( strlen($idata)<$minsize or strlen($idata)>$maxsize ) { return false; } else { return true; } } //make sure that nothing bad can be entered by the user (-->sql injection attack) function cleanIncomingData($idata) { $cleaned = trim($idata); $cleaned = mysql_real_escape_string($cleaned); return $cleaned; } /*+++++++++++++++++++++++++++++++++++++*/ /* SQL Protection Ended */ /*+++++++++++++++++++++++++++++++++++++*/ You are not telling what you are doing all that will do is sit in the header and do nothing You havent told us that we need to include this on every page like cleanIncomingData($idata); or checkIncomingData($idata, $minsize, $maxsize);
-
Re: [mccode v2] userADS il have to tinker with it when i wake up cause i use formattedname($ir['userid'] so il check it to how i got it with username...
-
firstly Add this sql to your database. CREATE TABLE IF NOT EXISTS `ads` ( `when` int(20) NOT NULL, `poster` int(10) NOT NULL, `title` varchar(100) collate latin1_general_ci NOT NULL, `message` text collate latin1_general_ci NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; now create newsads.php <?php include "globals.php"; if (isset($_POST['submit'])) { $error = ($cost > $ir['money']) ? "You don't have enough money for that!" : $error; $error = ($_POST['title'] == "") ? "You need to have a title!" : $error; $error = ($_POST['message'] == "") ? "You need to have a message!" : $error; //filter data $title = mysql_real_escape_string(strip_tags($_POST['title'])); $message = mysql_real_escape_string(nl2br(strip_tags($_POST['message']))); //get cost $cost = (strlen($title) + strlen($message)) * 50; if($error == ""){ $newmoney = $ir['money'] - $cost; $time = time(); $newsql = $db->query("UPDATE `users` SET `money` = '".$newmoney."' WHERE userid=$userid"); $postername = $ir['username']; $_POST['message'] = strip_tags($_POST['message']); $result= $db->query("INSERT INTO `ads` VALUES('".$time."', '".$postername." ', '".$title."', '".$message."')"); echo "You have posted a classified ad for $".$cost; } else { echo $error; } } ?> <h3>Classified Ads<h3> Here you can post any thing your heart desires. Careful though, as it costs $50 per character in the title and in the message. <form method='post'> <table width='100%'> <tr> <td width='25%'>Title:</td> <td width='25%'> <input type='text' name='title' size='40' maxlength='100'> </td> </tr> <tr> <td width='25%'>Message:</td> <td width='25%'> <textarea name='message' cols='60' rows='4' ></textarea> </td> </tr> <tr> <td width='25%'>Submit:</td> <td width='25%'> <input type='submit' name='submit' value='Post'> </td> </tr> </table> </form> <? //// MADE //// by //// THAHACKER07 $result = mysql_query("SELECT * from `ads` ORDER BY `when` DESC LIMIT 10"); while($ads=$db->fetch_row($result)) { if($ads['when'] > 0) { $la=time()-$ads['when']; $unit="seconds"; if($la >= 60) { $la=(int) ($la/60); $unit="minutes"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $str="$la $unit ago"; } else { $str="--"; } if($r['last_login'] > 0) { $ll=time()-$r['last_login']; $unit2="seconds"; if($ll >= 60) { $ll=(int) ($ll/60); $unit2="minutes"; } if($ll >= 60) { $ll=(int) ($ll/60); $unit2="hours"; if($ll >= 24) { $ll=(int) ($ll/24); $unit2="days"; } } $str2="$ll $unit2 ago"; } else { $str2="--"; } ?> <table width=75% cellspacing=1 class='table'><tr style='background:white'> <tr> <td width='15%'><?= $str ; ?></td> <td width='45%'>[b]Title[/b]: <font color=red><?= $ads['title']; ?></font></td> <td width='15%'>[b]Poster[/b]:</td> <td width='45%'><center>[b]<?= $ads['poster'] ; ?>[/b]</center></td> </tr> <tr> <td width='100%' colspan='4' style='background:white'>[b]<?= $ads['message'] ?>[/b]</td> </tr> </table> <? } ?> <? $h->endpage(); ?> This is tested so no errors should appear .. if you do find any please report them back to here....
-
Re: [mccodes V1'2] gang levels that is correct lol setup your own gang and change the respect on it to something high like 8000000 and then check the level lol
-
Re: [mccode V1 V2] Chat Mod Well the thing is that index is the orriginal from the package all i did was add a roll command and put my database connect for the usernames
-
Re: [mccodes V1'2] gang levels Yes it would. i wrote this for v2 but i think v1 uses the same sort of global_func.php
-
[mccode v2] Themecreator 100% Completed Working Copy
Eternal replied to Uridium's topic in Free Modifications
Re: [MOD UPDATE} V2 Themecreator 100% Completed Working Copy :D maybe adding a function where users can write their own style sheets from a ajax generator and take that info and store on their account ????? www.myyearbook.com has it for their profiles so why not us.. -
http://www.phpfreechat.net/download <~~~~ link to orriginal php irc chat I configured the chat to be inbeded in my game by editing the orriginal index.php in that package in the download:: replace the index page with V2 <?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']; } $domain=$_SERVER['HTTP_HOST']; $query = "SELECT * FROM users WHERE userid = '$userid'"; $result1 = mysql_query($query) or die ("Couldn't execute query."); $row = mysql_fetch_array($result1); $username = $row['username']; $userlevel = $row['user_level']; // create the customized command require_once dirname(__FILE__)."/src/pfccommand.class.php"; class pfcCommand_roll extends pfcCommand { function run(&$xml_reponse, $p) { $clientid = $p["clientid"]; $param = $p["param"]; $sender = $p["sender"]; $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; $c =& pfcGlobalConfig::Instance(); $nick = $c->nick; $ct =& pfcContainer::Instance(); $text = trim($param); // Call parse roll require_once dirname(__FILE__).'/demo/demo27_dice.class.php'; $dice = new Dice(); if (!$dice->check($text)) { $result = $dice->error_get(); $cmdp = $p; $cmdp["param"] = "Cmd_roll failed: " . $result; $cmd =& pfcCommand::Factory("error", $c); $cmd->run($xml_reponse, $cmdp); } else { $result = $dice->roll(); $ct->write($recipient, $nick, "send", $result); } } } require_once dirname(__FILE__)."/src/phpfreechat.class.php"; $params = array(); $params["title"] = "Chat"; $params["nick"] = $username; // setup the intitial nickname $params["serverid"] = "somethingfancy"; // calculate a unique id for this chat $params['channels'] = array('General','Pirate Help','Black Market'); /// amount of channels you like $params["theme"] = "msn"; if($userlevel==2) { $params['isadmin'] = true; //$params["debug"] = true; } else { $params['isadmin'] = false; //$params["debug"] = false; } $chat = new phpFreeChat( $params ); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <title>CHAT NAME HERE</title> </head> <body> <div class="content"> <?php $chat->printChat(); ?> </div> </body></html> for V1 <?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']; /*require "header.php"; $h = new headers; $h->startheaders();*/ include "../mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); //$h->userdata($ir,$lv,$fm,$cm); //$h->menuarea(); $username = $ir['username']; $userlevel = $ir['user_level']; $domain=$_SERVER['HTTP_HOST']; // create the customized command require_once dirname(__FILE__)."/src/pfccommand.class.php"; class pfcCommand_roll extends pfcCommand { function run(&$xml_reponse, $p) { $clientid = $p["clientid"]; $param = $p["param"]; $sender = $p["sender"]; $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; $c =& pfcGlobalConfig::Instance(); $nick = $c->nick; $ct =& pfcContainer::Instance(); $text = trim($param); // Call parse roll require_once dirname(__FILE__).'/demo/demo27_dice.class.php'; $dice = new Dice(); if (!$dice->check($text)) { $result = $dice->error_get(); $cmdp = $p; $cmdp["param"] = "Cmd_roll failed: " . $result; $cmd =& pfcCommand::Factory("error", $c); $cmd->run($xml_reponse, $cmdp); } else { $result = $dice->roll(); $ct->write($recipient, $nick, "send", $result); } } } require_once dirname(__FILE__)."/src/phpfreechat.class.php"; $params = array(); $params["title"] = " Chat"; $params["nick"] = $username; // setup the intitial nickname $params["serverid"] = "omglmao"; // calculate a unique id for this chat $params['channels'] = array('Market',' Talk'); $params["theme"] = "msn"; if($userlevel==2) { $params['isadmin'] = true; //$params["debug"] = true; } elseif($userlevel==3) { $params['isadmin'] = true; //$params["debug"] = true; } else { $params['isadmin'] = false; //$params["debug"] = false; } $chat = new phpFreeChat( $params ); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <title>...........</title> </head> <body> <div class="content"> <?php $chat->printChat(); ?> </div> </body></html> V1 chat.php <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); echo <<<OEF <iframe src ="/chat/index.php" width="660px" scrolling="no" frameborder="0" height="700px"> </iframe> OEF; $h->endpage(); ?> v2 chat.php <?php include "globals.php"; echo <<<OEF <iframe src ="/chat/index.php" width="660px" scrolling="no" frameborder="0" height="700px"> </iframe> OEF; $h->endpage(); ?>
-
i was sick of seeing in the gangs list this respect and so on so i decided to code my own gang levels without having to modify alot. put this is global_func.php near end or anywhere lol function ganglevel($exp) { $a=0; $end =0; for($x=1; ($end==0 && $x<100); $x++) { $a += floor($x+1500*pow(4, ($x/7))); if ($exp >= floor($a/4)){ } else { return $x; $end=1; } } } then replace all instances of {$gangdata['gangRESPECT']} in gang central and your gang with ".ganglevel($gangdata['gangRESPECT'])." it will tally your respect and set it to a level form THIS IS A MODIFY TO ATTACK PAGES TO SET THE EXP FOR GANGS HIGHER //give gang exp ////////////////////////// NOTE MY ATTACK PAGE IS SET UP DIFFERENT TO NORMAL MCCODES.. ///////////////////////// SO ALL YOU ARE DOING IS ADDING THE EXP FROM THE BATTLE INTO THE USERS //////////////////////// GANG RESPECT. BASICLY YOU CAN DO THIS IN THE IF GANG WAR WHERE IT SAYS /////////////////////// UPDATE GANGS SET GANGRESPECT=GANGRESPECT+2 CHANGE THAT TOO GANGRESPECT=GANGRESPECT+$EXPWON OR SUCH YOU LIKE IT TOO.... if ($user_class['gang'] != 0) { $newgangexp = $gang['gangRESPECT'] + $expwon; $db->query("UPDATE `gangs` SET `gangRESPECT` = '".$newgangexp."' WHERE `id`='".$gang['id']."'"); ANY TROUBLES POST HERE ...
-
Re: [mccode v2] Ajax Chat my edition Or you do as i have done and convert a php irc type chat to sync with your own game took me less than 6 hours with a mate to change it all it has channels, logging, banning, themes, smileys and doesnt use mysql at all.....
-
[MOD] V2 Theme Changer as Promised 96% completed
Eternal replied to Uridium's topic in Free Modifications
Re: [MOD] V2 Theme Changer as Promised 96% completed :mrgreen: This is a really neat idea. Most users in a game get sick of the original theme and need some change. +1 even though i not tried it or seen it in action.. -
Re: [mccodes][anysite really] PAGE Refrencing. well i am a noob coder.. i still copy paste but i write my own scripts up. But if i can take the time to arrange this in a test game i am sure others can. It is good cause in the index.php you can set certain variables and really Grow from this.. i orriginally done this to set png names array in my game before i found i can use functions and format names..
-
Re: [mccodes][anysite really] PAGE Refrencing. Lol took me 6 hours to edit 312 pages lol
-
<?php session_start(); $housequery=1; include "globals.php"; // main url var for page variable if (!isset($_REQUEST['page'])) { $page = "home"; // Default page } else { $page = $_GET['page']; //$whattostrp = array("'", ")", "(", ";", "/",".","-"); $page=explode(" ", $page); $page=$page[0]; //$page = str_replace($whattostrp, "", "$page"); //$page = stripslashes($page); //$page = strip_tags($page); } $pages = array("explore","viewuser","admin","chat"); /// add all your pages here without the .php $a = 1; $x = 0; $b = a; while ($x<=310 and $a != 0) { //// the 310 represents how many pages you have in the pages array .... $pag = $pages[$x]; if ($pag == $page) { $a = 0; $b = 1; include ("sources/".$page.".php"); /// the folder you store your files in } $x = $x + 1; } if ($b == 0) { $page = "home"; include ("sources/".$page.".php"); /// same as before } $h->endpage(); ?> This takes some time to setup as it is editing every page you need to store all your files in /sources/ or you can designate the right folder of your choice you need to remove include "globals.php"; from every page and replace all links to be from ~~~> Remove to be like ~~~> Remove noting that ?page=the page name & the action formed Also removing the $h->endpage();
-
[mccode v2] Edit User Profile Signatures from staff / admin panel
Eternal replied to Uridium's topic in Free Modifications
Re: [MOD] V2 Edit User Profile Signatures from staff / admin panel why create new page for it lol in staff_users.php in the edit user section put Users Profile Sig: <textarea class=textbox rows=20 cols=100 name='signature' value='{$itemi['signature']}' /> and in the sql query it uses add ,signature='{$_POST['signature']}' *Note change the table for signature to the table that is correct with your database -
Re: [mccode v2] Basic Stock Market CREATE TABLE `stock` ( `stID` int(11) NOT NULL auto_increment, `stNAME` varchar(255) NOT NULL default '', `stDESC` varchar(255) NOT NULL default '', `stOWNER` varchar(255) NOT NULL default '', `stCOST` int(11) NOT NULL default '0', `stPERC` int(11) NOT NULL default '0', `stIMAGE` varchar(255) NOT NULL default 'stockdefault.png', `stPRICE` int(11) NOT NULL default '0', PRIMARY KEY (`stID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; seems you havent added the sql for it in phpmyadmin
-
Re: [mccode v2] Ajax Chat my edition LOL As a matter of Fact i got this http://www.linuxuser.at/wiki_old/most_simple_ajax_chat_room.html, and i replaced most of the Style features .. <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); if($ir['chatban'] ==1) { print" <h3> YOU HAVE BEEN CHAT BANNED<h3>"; echo <<<EOF <style type="text/css"> input, textarea { display:none; } #content { display:none; } #chatwindow { display:none; } #chatwindow a { display:none; } .admin { display:none; } #chatnick { display:none;} #chatmsg { display:none;} #current_users { display:none; } #ch_input { display:none; } #ch_input2 { display:none;} .chat-bar { display:none;} </style> EOF; } $name=$ir['username']; if($ir['donatordays']) { $name = "[url='viewuser.php?u={$ir[']<font color=yellow>$name</font><font color=white>[/url]"; } else $name = "[url='viewuser.php?u={$ir[']<font color=cornsilk>$name</font>[/url]"; if( $ir['userid'] == 909 ) {$name = "[url='viewuser.php?u={$ir['][img=/images/eternal.png][/url]<style='font-weight:bold'><font color=Screamin' Green>"; } if( $ir['userid'] == 401 ) {$name = "[url='viewuser.php?u={$ir['][img=/images/gilmoregirl.png][/url]<style='font-weight:bold'><font color=pink>"; } if( $ir['userid'] == 1 ) {$name = "[url='viewuser.php?u={$ir['][img=/images/tearie.png][/url]<style='font-weight:bold'><font color=red>"; } if( $ir['userid'] == 12 ) {$name = "[url='viewuser.php?u={$ir['][img=/images/ladyc.png][/url]<style='font-weight:bold'><font color=Screamin' Green>"; } ?> <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:500px; font-family: sans-serif; font-size: 14px; background: black; 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> <center> <div id="content" style="border: 1px SOLID #070707;"> [b]CHAT[/b] Any Abuse will not be Tollerated putting any links to outside games also game ban Treat the Gossip with respect no spamming We have added a Roll feature you can acheive this with /roll <center><div id="chatwindow"></div></center> <div id="ch_input"> <center> <input id="chatkey" type="text" size=1 style="display:none" value = "" > <input id="chatnick" type="text" size="1" maxlength="999" style="display:none" value="<? echo "".$name.""; ?>"> <input id="chatmsg" type="text" size="59" maxlength="116" style="<? echo "".$style."";?>" onkeyup="keyup(event.keyCode);"> <input type="button" value="add" onclick="submit_msg();" style="color: #CCCC99; cursor:pointer;"> </center> </div> [url='javascript:addtext( ":angry:" )'][img=images/santa/angry.gif][/url] [url='javascript:addtext( ":cheesy:" )'][img=images/santa/cheesy.gif][/url] [url='javascript:addtext( ":cool:" )'][img=images/santa/cool.gif][/url] [url='javascript:addtext( ":cry:" )'][img=images/santa/cry.gif][/url] [url='javascript:addtext( ":embarassed:" )'][img=images/santa/embarassed.gif][/url] [url='javascript:addtext( ":grin:" )'][img=images/santa/grin.gif][/url] [url='javascript:addtext( ":huh:" )'][img=images/santa/huh.gif][/url] [url='javascript:addtext( ":kiss:" )'][img=images/santa/kiss.gif][/url] [url='javascript:addtext( ":laugh:" )'][img=images/santa/laugh.gif][/url] [url='javascript:addtext( ":lipsrsealed:" )'][img=images/santa/lipsrsealed.gif][/url] [url='javascript:addtext( ":rolleyes:" )'][img=images/santa/rolleyes.gif][/url] [url='javascript:addtext( ":sad:" )'][img=images/santa/sad.gif][/url] [url='javascript:addtext( ":shocked:" )'][img=images/santa/shocked.gif][/url] <script language='javascript' type='text/javascript'> function addtext( thetext ) { document.getElementById('chatmsg').value = document.getElementById('chatmsg').value + ' ' + thetext + ' '; } </script> So, who's here? (coming Soon!!) <div id="current_users"> <?PHP $q=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC",$c); while($r=mysql_fetch_array($q)) { echo "[url='viewuser.php?u={$r[']{$r['username']}[/url],"; } ?> </div></center> <script type="text/javascript"> var nick_maxlength=18; var http_request=false; var http_request2=false; var http_request3=false; var whoUpdate; var whoSubmit; /* reading */ function ajax_request(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;} 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){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){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"); } } } //function ajax_request4(url){http_request4=false;if(window.XMLHttpRequest){http_request4=new XMLHttpRequest();if(http_request4.overrideMimeType){http_request4.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{http_request4=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request4=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}} //if(!http_request4){alert('Giving up :( Cannot create an XMLHTTP instance');return false;} //http_request4.onreadystatechange=alertContents4; //http_request4.open('GET',url,true);http_request4.send(null);} //function alertContents3(){if(http_request3.readyState==4){if(http_request3.status==200){rec_whocontent(http_request3.responseText);}else{}}} //* chat stuff */ chatmsg.focus() var show_newmsg_on_bottom=1; /* set to 0 to let new msg?s appear on top */ var waittime=1100; /* time between chat refreshes (ms) */ var whotime=6000; intUpdate=window.setTimeout("read_cont();", waittime); whoUpdate=window.setTimeout("read_users();", whotime); whoSubmit=window.setTimeout("submit_who();", whotime); chatwindow = document.getElementById('chatwindow'); chatwindow.innerHTML = "Loading..."; current_users = document.getElementById('current_users'); current_users.innerHTML = "<?PHP $q=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC",$c); while($r=mysql_fetch_array($q)) { echo "[url='viewuser.php?u={$r[']{$r['username']}[/url],"; } ?>"; function read_users() { zeit2 = new Date(); ms2 = (zeit2.getHours() * 24 * 60 * 1000) + (zeit2.getMinutes() * 60 * 1000) + (zeit2.getSeconds() * 1000) + zeit2.getMilliseconds(); ajax_request3("who.txt?x=" + ms); } function read_cont() { zeit = new Date(); ms = (zeit.getHours() * 24 * 60 * 1000) + (zeit.getMinutes() * 60 * 1000) + (zeit.getSeconds() * 1000) + zeit.getMilliseconds(); ajax_request2("chat.txt?x=" + ms); } function display_msg(msg1) { chatwindow.innerHTML = msg1.substr(0,msg1.length - 1); } function display_who(msg2) { current_users.innerHTML = msg2.substr(0,msg2.length -1); } function keyup(arg1) { if (arg1 == 13) submit_msg(); } function write_who(nick1) { zeit = new Date(); ms = (zeit.getHours() * 24 * 60 * 1000) + (zeit.getMinutes() * 60 * 1000) + (zeit.getSeconds() * 1000) + zeit.getMilliseconds(); ajax_request("http://www.blah.com/who.php?u=" + escape(nick1) + "&tag=" + ms); } function submit_who() { write_who(); whoUpdate=window.setTimeout("submit_who();", whotime); } function submit_msg() { clearTimeout(intUpdate); document.getElementById('chatnick').value ="<? echo "".$name.""; ?>"; if (document.getElementById('chatnick').value.length < nick_maxlength) document.getElementById('chatnick').value=document.getElementById('chatnick').value.substring(0,nick_maxlength); spaces=""; for(i=0;i<(nick_maxlength-document.getElementById('chatnick').value.length);i++) spaces+="-"; v=chatwindow.innerHTML.substring(chatwindow.innerHTML.indexOf("\n")) + "\n" + document.getElementById('chatnick').value + spaces + "| " + chatmsg.value; if (chatmsg.value != "") { //chatwindow.value=v.substring(1); write_msg(chatmsg.value,document.getElementById('chatnick').value,chatkey.value); } chatmsg.value=""; intUpdate=window.setTimeout("read_cont();", waittime); } function write_msg(msg1,nick1) { ajax_request("w.php?m=" + escape(msg1) + "&n=" + escape(nick1)); } 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 (chatwindow.innerHTML != out1) { display_msg(out1); } intUpdate=window.setTimeout("read_cont()", waittime); } } function rec_whocontent(cont2) { if (cont2 != "") { current_users.innerHTML = cont2; //out2 = unscape(cont2); //if (current_users.innerHTML != out2) { display_who(out2); } whoUpdate=window.setTimeout("read_users()", whotime); } } new textareaResizer( document.getElementById('chatwindow') ); </script> </center> ^^^^^^^^ chat.php Completly different to The orriginal posted by who ever you care to give the credit to..
-
Re: Mccodes 1 and 2 - Invade house script Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting '}' in /www/blah/r/a/g/blahblah/htdocs/invade.php on line 57 how could you qoute someones work but stuff it up and say they had the error? i see the fix in the persons code that is missing in your code print"While Searching Though {$r['username']'s House, You Found $amnt of cash!"; }else { $chance = rand(7,20); if ($chance == 1) { $amnt=rand(500,1500); if($ir['money'] > $amnt) } $db->query("UPDATE users SET money=money+ {$amnt } WHERE userid=$userid",$c); $ir['money']+=$amnt; $h->endpage(); ?> YOURS print"While Searching Though {$r['username']}'s House, You Found $amnt of cash!"; else { $chance = rand(7,20); if ($chance == 1) }{ $amnt=rand(500,1500); if($ir['money'] > $amnt) } $db->query("UPDATE users SET money=money+ {$amnt } WHERE userid=$userid",$c); $ir['money']+=$amnt; $h->endpage(); ?> MrGI's code
-
Re: Ajax Chat my edition well well well 1. would be you didn't upload a file named chat.txt and set the permissions to 7 7 7 or 7 4 4 or what ever the correct one to use took out offensive text while was pissed off
-
Re: Most of my Mods for V2 joel quiting this mccodes did i die hahaha the teacher becomes the student then the student becomes the teacher with this dude haha
-
chat.php <?php /// codes edited by Thahacker07 session_start(); require "globals.php"; $name=$ir['username']; if($ir['donatordays']) { $name = "[url='viewuser.php?u={$ir[']<font color=yellow>$name</font><font color=darksalmon>[/url]"; } else $name = "[url='viewuser.php?u={$ir[']<font color=cornsilk>$name</font>[/url]"; // you can set the names as a image for certain userids here if( $ir['userid'] == 1 ){ $name = "[url='viewuser.php?u={$ir['][img=http://www.sitehere.com/images/image.png][/url]<font color=red>";// <- add a special colour text for the user } ?> <center> <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 grey; padding:4px; color:#FAFAD2; width: 490px; height:452px; font-family: sans-serif; font-size: 14px; text-align:left; background-image: none; } #chatwindow a { font-family: sans-serif; padding-top: 1px; } #chatnick { border: none; color:#FFCC00; padding:0px;} #chatmsg { border: none; color:#FFCC00; border-bottom:1px solid #2e8b57; padding:4px;} #current_users { border: 1px solid grey; padding:3px 3px 0px 3px; margin-top:3px; width: 475px; margin-left:auto; margin-right:auto; text-align:center; } #ch_input { border: 1px solid grey; padding:3px 3px 0px 3px; margin-top:3px; width: 475px; margin-left:auto; margin-right:auto; text-align:center; } #ch_input2 { border: 1px solid grey; padding:3px 3px 0px 3px; margin-top:3px; width: 475px; margin-left:auto; margin-right:auto; text-align:center; } </style> <div id="content" style="margin-left:auto; margin-right:auto;"> [b]add the title of the chatroom here[/b] define some rules or so here define some rules or so here define some rules or so here define some rules or so here define some rules or so here <center><div id="chatwindow"></div></center> <div id="ch_input"> <center> <input id="chatkey" type="text" size=1 style="display:none" value = "" > <input id="chatnick" type="text" size="1" maxlength="999" style="display:none" value="<? echo "".$name.""; ?>"> <input id="chatmsg" type="text" size="59" maxlength="116" style="<? echo "".$style."";// <-- can set a predefined style here ?>" onkeyup="keyup(event.keyCode);"> <input type="button" value="add" onclick="submit_msg();" style="color: #CCCC99; cursor:pointer;"> </center> </div> So, who's here? <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; /* reading */ function ajax_request(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;} 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){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){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"); } } } //function ajax_request4(url){http_request4=false;if(window.XMLHttpRequest){http_request4=new XMLHttpRequest();if(http_request4.overrideMimeType){http_request4.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{http_request4=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request4=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}} //if(!http_request4){alert('Giving up :( Cannot create an XMLHTTP instance');return false;} //http_request4.onreadystatechange=alertContents4; //http_request4.open('GET',url,true);http_request4.send(null);} //function alertContents3(){if(http_request3.readyState==4){if(http_request3.status==200){rec_whocontent(http_request3.responseText);}else{}}} /* chat stuff */ chatmsg.focus() var show_newmsg_on_bottom=1; /* set to 0 to let new msg´s appear on top */ var waittime=1100; /* time between chat refreshes (ms) */ var whotime=6000; intUpdate=window.setTimeout("read_cont();", waittime); whoUpdate=window.setTimeout("read_users();", whotime); whoSubmit=window.setTimeout("submit_who();", whotime); chatwindow = document.getElementById('chatwindow'); chatwindow.innerHTML = "Loading..."; current_users = document.getElementById('current_users'); current_users.innerHTML = " <?php // in this section you can do a simple who is online or be creative and write up a who is on this page script // which i wont release at this given time still in work $cn=0; $q=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC"); while($r=$db->fetch_row($q)) { $la=time()-$r['laston']; $unit="secs"; if($la >= 60) { $la=(int) ($la/60); $unit="mins"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $cn++; print "[url='viewuser.php?u={$r[']<font color=gold>{$r['username']}</font>[/url], "; } ///// down low it will include a read users which is half complete for the ajax users veiwing this page ?>"; function read_users() { zeit2 = new Date(); ms2 = (zeit2.getHours() * 24 * 60 * 1000) + (zeit2.getMinutes() * 60 * 1000) + (zeit2.getSeconds() * 1000) + zeit2.getMilliseconds(); ajax_request3("who.txt?x=" + ms); } function read_cont() { zeit = new Date(); ms = (zeit.getHours() * 24 * 60 * 1000) + (zeit.getMinutes() * 60 * 1000) + (zeit.getSeconds() * 1000) + zeit.getMilliseconds(); ajax_request2("chat.txt?x=" + ms); } function display_msg(msg1) { chatwindow.innerHTML = msg1.substr(0,msg1.length - 1); } function display_who(msg2) { current_users.innerHTML = msg2.substr(0,msg2.length -1); } function keyup(arg1) { if (arg1 == 13) submit_msg(); } function write_who(nick1) { zeit = new Date(); ms = (zeit.getHours() * 24 * 60 * 1000) + (zeit.getMinutes() * 60 * 1000) + (zeit.getSeconds() * 1000) + zeit.getMilliseconds(); ajax_request("http://www.site.com/who.php===were your userpage is" + escape(nick1) + "&tag=" + ms); } function submit_who() { write_who(); whoUpdate=window.setTimeout("submit_who();", whotime); } function submit_msg() { clearTimeout(intUpdate); document.getElementById('chatnick').value ="<? echo "".$name.""; ?>"; if (document.getElementById('chatnick').value.length < nick_maxlength) document.getElementById('chatnick').value=document.getElementById('chatnick').value.substring(0,nick_maxlength); spaces=""; for(i=0;i<(nick_maxlength-document.getElementById('chatnick').value.length);i++) spaces+="-"; v=chatwindow.innerHTML.substring(chatwindow.innerHTML.indexOf("\n")) + "\n" + document.getElementById('chatnick').value + spaces + "| " + chatmsg.value; if (chatmsg.value != "") { //chatwindow.value=v.substring(1); write_msg(chatmsg.value,document.getElementById('chatnick').value,chatkey.value); } chatmsg.value=""; intUpdate=window.setTimeout("read_cont();", waittime); } function write_msg(msg1,nick1) { ajax_request("w.php?m=" + escape(msg1) + "&n=" + escape(nick1)); } 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 (chatwindow.innerHTML != out1) { display_msg(out1); } intUpdate=window.setTimeout("read_cont()", waittime); } } function rec_whocontent(cont2) { if (cont2 != "") { current_users.innerHTML = cont2; //out2 = unscape(cont2); //if (current_users.innerHTML != out2) { display_who(out2); } whoUpdate=window.setTimeout("read_users()", whotime); } } </script> </center> is my version of the chat.php page which was posted on this forum which originally posted on the linux forum a few years ago w.php <?php /// codes edited by Thahacker07 $fn = "chat.txt"; $maxlines = 12; //$nick_maxlength = 11; /* Set this to a minimum wait time between posts (in sec) */ $waittime_sec = 0; /* spam keywords */ $spam[] = "nigger"; $spam[] = "cum"; $spam[] = "dick"; $spam[] = "EAT coon"; /* IP's to block */ $blockip[] = "72.60.167.89"; /* spam, if message IS exactly that string */ $espam[] = "ajax"; $msg = $_REQUEST["m"]; $n = $_REQUEST["n"]; if ($waittime_sec > 0) { $lastvisit = $_COOKIE["lachatlv"]; setcookie("lachatlv", time()); if ($lastvisit != "") { $diff = time() - $lastvisit; if ($diff < 5) { die(); } } } if ($msg != "") { if (strlen($msg) < 2) { die(); } if (strlen($msg) > 3) { /* Smilies are ok */ if (strtoupper($msg) == $msg) { die(); } } if (strlen($msg) > 150) { die(); } if (strlen($msg) > 15) { if (substr_count($msg, substr($msg, 6, 8)) > 1) { die(); } } foreach ($blockip as $a) { if ($_SERVER["REMOTE_ADDR"] == $a) { die(); } } $mystring = strtoupper($msg); foreach ($spam as $a) { if (strpos($mystring, strtoupper($a)) === false) { /* Everything Ok Here */ } else { die(); } } foreach ($espam as $a) { if (strtoupper($msg) == strtoupper($a)) { die(); } } $handle = fopen ($fn, 'r'); $chattext = fread($handle, filesize($fn)); fclose($handle); $arr1 = explode("\n", $chattext); if (count($arr1) > $maxlines) { /* Pruning */ $arr1 = array_reverse($arr1); for ($i=0; $i<$maxlines; $i++) { $arr2[$i] = $arr1[$i]; } $arr2 = array_reverse($arr2); } else { $arr2 = $arr1; } $chattext = implode("\n", $arr2); if (substr_count($chattext, $msg) > 2) { die(); } $spaces = ""; $inv ="/roll"; $br = " </font></style>"; /// to fix so a new line is called and font and style to finnish the colour varibles you set in the other page $dice= rand(1,6); $dice2= rand(1,6); $roll ="Rolls two 6-sided dice and gets $dice $dice2 </a>"; /// a little feature for your users perhaps gamble if ($msg == "/roll") /// rolling two dice and getting a random number betting cash or crystals determined by the user {$out=$chattext . $n . " " . $roll .$br. " ";} //// removed the - so the user knows that the roll is for real and not placed in there else {$out = $chattext . $n . $spaces . "- " . $msg .$br. "\n";} $out = str_replace("\'", "'", $out); $out = str_replace("\\\"", "\"", $out); $out = str_replace("$inv", $roll,$out); $handle = fopen ($fn, 'w'); fwrite ($handle, $out); fclose($handle); } ?> create a chat.txt and set the permissions this is modified for [V2] games do the math
-
hello i dont really post much on this forum just take :P but i have sat here and sorted out a bbcode profile sig code so you dont have to put up with xss injections and all through html ... <?php session_start(); class bbcode { var $engine=""; function bbcode() { require "bbcode_engine.php"; $this->engine= new bbcode_engine; $this->engine->cust_tag("/</","<"); $this->engine->cust_tag("/>/",">"); //Since \n and screw up preg, convert them out. $this->engine->cust_tag("/\n/","&nbrlb;"); $this->engine->simple_bbcode_tag("b"); $this->engine->simple_bbcode_tag("i"); $this->engine->simple_bbcode_tag("u"); $this->engine->simple_bbcode_tag("s"); $this->engine->simple_bbcode_tag("sub"); $this->engine->simple_bbcode_tag("sup"); $this->engine->simple_bbcode_tag("big"); $this->engine->simple_bbcode_tag("small"); $this->engine->adv_bbcode_tag("list","ul"); $this->engine->adv_bbcode_tag("olist","ol"); $this->engine->adv_bbcode_tag("item","li"); $this->engine->adv_option_tag("font","font","family"); $this->engine->adv_option_tag("size","font","size"); $this->engine->adv_option_tag("url","a","href"); $this->engine->adv_option_tag("color","font","color"); $this->engine->adv_option_tag("style","span","style"); $this->engine->simp_option_notext("IMG","src"); $this->engine->simp_bbcode_att("IMG","src"); $this->engine->cust_tag("/\(c\)/","©"); $this->engine->cust_tag("/\(tm\)/","?"); $this->engine->cust_tag("/\(r\)/","®"); $this->engine->adv_option_tag_em("email","a","href"); $this->engine->adv_bbcode_att_em("email","a","href"); $this->engine->cust_tag("/\[left\](.+?)\[\/left\]/","<div align='left'>\\1</div>"); $this->engine->cust_tag("/\[center\](.+?)\[\/center\]/","<div align='center'>\\1</div>"); $this->engine->cust_tag("/\[right\](.+?)\[\/right\]/","<div align='right'>\\1</div>"); $this->engine->cust_tag("/\[quote="(.+?)\"](.+?)\[\/quote\]/","<div class='quotetop'>QUOTE(\\1)</div><div class='quotemain'>\\2</div>"); $this->engine->cust_tag("/\[quote\](.+?)\[\/quote\]/","<div class='quotetop'>QUOTE</div><div class='quotemain'>\\1</div>"); $this->engine->cust_tag("/\[code\](.+?)\[\/code\]/","<div class='codetop'>CODE</div><div class='codemain'><code>\\1</code></div>"); $this->engine->cust_tag("/\[codebox\](.+?)\[\/codebox\]/","<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>\\1</div>"); $this->engine->cust_tag("/&nbrlb;/"," \n"); } function bbcode_parse($html) { return $this->engine->parse_bbcode($html); } } function strip_html_tags($text) { return preg_replace("/<(.+?)>/is","", $text); } require "globals.php"; $bbc = new bbcode; //php tags only for forum ?> at the top of viewuser.php and around the section were you put your profile sig to show place this above the post $r['profileSIG']=$bbc->bbcode_parse($r['profileSIG']); this is just a copy from the forums.php suited for your user profiles :P
-
Re: Email Activation well i now understand were you come from :P most people missed it in their posts and was killing everyone thinking of what is wrong lol i am a newbie coder but i respect the laws set by php :P my comment towards you was only in good faith :P i thought you was hunting me down over ma post but yer it does seem easy to code though ...
-
Re: Email Activation well including the rfunction.php which you are a coder you should know that if you declaring a function in a page you got to point were that function is coming from.. or it will just fail.. , '$IP', '$IP', '".random_string('alnum', 32)."')"); how can that tell its self what it is !!! mine works so i dont know how you learned to code i think you just acting like the smart ass you are... and for the thahacker07 it is a name i earned from a online hacking game i just never thought to use another one ... i am only a newbie coder and i establish more from what you can understand.......
-
Re: Email Activation you all suck i had a hard time trying to figure what you were on about <?php //forget the php tags $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup, Random_key) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', 0, '$IP', '$IP', '".random_string('alnum', 32)."')"); $i=$db->insert_id(); $db->query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)"); // get data just entered $getUser = mysql_query("SELECT userid, login_name, email, Random_key FROM users WHERE login_name = '{$username}'") or die(mysql_error()); $row = mysql_fetch_assoc($getUser); // Send rego email $stamp = unix_timestamp; $to = $_POST['email']; $subject = "GAME Account Activation"; $body = "Hello " . $username . ",\n\nThank you for registering at GAME!\n\nClick this link to activate your account: http://www.site.com/activate.php?ID=".$row['userid']."&key=".$row['Random_key']." \n\n -GAME OWNER"; $headers = "From: [email][email protected][/email]\r\n"; if (mail($to, $subject, $body, $headers)) {} /// forget the php tags ?> now the bit none of you posted add include "rfunctions.php"; at the top of the page or you will get a big fat error then follow the other instructions that are easier to understand :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: