Jump to content
MakeWebGames

-BRAIDZ-

Members
  • Posts

    403
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by -BRAIDZ-

  1. Thank you, I will give it a go. I did put it in and created a new user, but didn't insert user stats or send the message. Maybe I inserted it into the wrong part of the code
  2. Okay thanks. Now I'm hopeless with this stuff, where would I put it?   <?php require "core.php"; function valid_email($email) { // First, we check that there's one @ symbol, and that the lengths are right if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) { // Email invalid because wrong number of characters in one section, or wrong number of @ symbols. return false; } // Split it into sections to make life easier $email_array = explode("@", $email); $local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) { return false; } } if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name $domain_array = explode(".", $email_array[1]); if (sizeof($domain_array) < 2) { return false; // Not enough parts to domain } for ($i = 0; $i < sizeof($domain_array); $i++) { if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) { return false; } } } return true; } print <<<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=utf-8"> <title>{$set['game_name']} - $metar </title> <meta name="keywords" content="RPG, Online Games, Online Mafia Game" /> <meta name="description" content=" {$set['game_name']} - Online Mafia Game " /> <meta name="author" content="Ravan Scripts " /> <meta name="copyright" content="Copyright {$_SERVER['HTTP_HOST']} " /> <link rel="SHORTCUT ICON" href="favicon.ico" /> <link rel="stylesheet" href="css/stylenew.css" type="text/css"/> <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen"/> <!--<script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="js/lightbox.js"></script>--> </head> <body> <div id="pagecontainer"> <!-- Header Part Starts --> <div class="headerpart"> <div ></div> <div class="toplist"> </div> </div> <script language="JavaScript"> <!-- function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name,value,expires,path,domain,secure) { document.cookie = name + "=" + escape (value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } function DeleteCookie (name,path,domain) { if (GetCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } // --> </script> <script language="JavaScript"> var usr; var pw; var sv; function getme() { usr = document.login.username; pw = document.login.password; sv = document.login.save; if (GetCookie('player') != null) { usr.value = GetCookie('username') pw.value = GetCookie('password') if (GetCookie('save') == 'true') { sv[0].checked = true; } } } function saveme() { if (usr.value.length != 0 && pw.value.length != 0) { if (sv[0].checked) { expdate = new Date(); expdate.setTime(expdate.getTime()+(365 * 24 * 60 * 60 * 1000)); SetCookie('username', usr.value, expdate); SetCookie('password', pw.value, expdate); SetCookie('save', 'true', expdate); } if (sv[1].checked) { DeleteCookie('username'); DeleteCookie('password'); DeleteCookie('save'); } } else { alert('$javaerr1'); return false; } } </script> <script type="text/javascript"> var xmlHttp // xmlHttp variable function GetXmlHttpObject(){ // This function we will use to call our xmlhttpobject. var objXMLHttp=null // Sets objXMLHttp to null as default. if (window.XMLHttpRequest){ // If we are using Netscape or any other browser than IE lets use xmlhttp. objXMLHttp=new XMLHttpRequest() // Creates a xmlhttp request. }else if (window.ActiveXObject){ // ElseIf we are using IE lets use Active X. objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP") // Creates a new Active X Object. } // End ElseIf. return objXMLHttp // Returns the xhttp object. } // Close Function function CheckPasswords(password){ // This is our fucntion that will check to see how strong the users password is. xmlHttp=GetXmlHttpObject() // Creates a new Xmlhttp object. if (xmlHttp==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request") // Alert Them! return // Returns. } // End If. var url="check.php?password="+escape(password) // Url that we will use to check the password. xmlHttp.open("GET",url,true) // Opens the URL using GET xmlHttp.onreadystatechange = function () { // This is the most important piece of the puzzle, if onreadystatechange = equal to 4 than that means the request is done. if (xmlHttp.readyState == 4) { // If the onreadystatechange is equal to 4 lets show the response text. document.getElementById("passwordresult").innerHTML = xmlHttp.responseText; // Updates the div with the response text from check.php } // End If. }; // Close Function xmlHttp.send(null); // Sends NULL insted of sending data. } // Close Function. function CheckUsername(password){ // This is our fucntion that will check to see how strong the users password is. xmlHttp=GetXmlHttpObject() // Creates a new Xmlhttp object. if (xmlHttp==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request") // Alert Them! return // Returns. } // End If. var url="checkun.php?password="+escape(password) // Url that we will use to check the password. xmlHttp.open("GET",url,true) // Opens the URL using GET xmlHttp.onreadystatechange = function () { // This is the most important piece of the puzzle, if onreadystatechange = equal to 4 than that means the request is done. if (xmlHttp.readyState == 4) { // If the onreadystatechange is equal to 4 lets show the response text. document.getElementById("usernameresult").innerHTML = xmlHttp.responseText; // Updates the div with the response text from check.php } // End If. }; // Close Function xmlHttp.send(null); // Sends NULL insted of sending data. } // Close Function. function CheckEmail(password){ // This is our fucntion that will check to see how strong the users password is. xmlHttp=GetXmlHttpObject() // Creates a new Xmlhttp object. if (xmlHttp==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request") // Alert Them! return // Returns. } // End If. var url="checkem.php?password="+escape(password) // Url that we will use to check the password. xmlHttp.open("GET",url,true) // Opens the URL using GET xmlHttp.onreadystatechange = function () { // This is the most important piece of the puzzle, if onreadystatechange = equal to 4 than that means the request is done. if (xmlHttp.readyState == 4) { // If the onreadystatechange is equal to 4 lets show the response text. document.getElementById("emailresult").innerHTML = xmlHttp.responseText; // Updates the div with the response text from check.php } // End If. }; // Close Function xmlHttp.send(null); // Sends NULL insted of sending data. } // Close Function. function PasswordMatch() { pwt1=document.getElementById('pw1').value; pwt2=document.getElementById('pw2').value; if(pwt1 == pwt2) { document.getElementById('cpasswordresult').innerHTML="<font color='green'>$rrerr5</font>"; } else { document.getElementById('cpasswordresult').innerHTML="<font color='red'>$rrerr6</font>"; } } </script> <!-- //Header Part End --> <!-- Flash Part Starts --> <div class="flashpart"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1000" height="460" title="Ravan Scripts"> <param name="movie" value="images/mafia.swf" /> <param name="quality" value="high" /> <param name="wmode" value="Transparent" /> <embed src="images/mafia.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1000" height="460"></embed> </object> </div> <!-- //Falsh Part End --> <!-- Menu Part Starts --> <div class="menu"> <ul> <li class="home_active"><a href="login.php" title="Home"> </a></li> <li class="story"><a href="story.php" title="The Story"> </a></li> <li class="contact"><a href="contact.php" title="Contact Us"> </a></li> <li class="signup"><a href="signup.php" title="Sign Up"> </a></li> </ul> </div> <!-- Menu Part End --> <!-- Register Page Start --> <br><br> <div align='center' style='width: 1000px;height:600px; background-image:url(images/reg_para_bg.jpg); border:0px solid #999;'> <div class='reg_container'> <form action=signup.php method=post> <div class='reg_frmpart'> <div class='regtop'> <div class='reg_nametxt'> EOF; $IP = $_SERVER['REMOTE_ADDR']; $IP=addslashes($IP); $IP=mysql_real_escape_string($IP); $IP=strip_tags($IP); if(file_exists('ipbans/'.$IP)) { die("<b><font color=red size=+1>$ipban</font></b></body></html>"); } if($_POST['username']) { if($set['regcap_on']) { if(!$_SESSION['captcha'] or $_SESSION['captcha'] != $_POST['captcha']) { unset($_SESSION['captcha']); print " <p> $rrerr0 </p> "; exit; } unset($_SESSION['captcha']); } if(!valid_email($_POST['email'])) { print " <P ALIGN='CENTER'> $rrerr1 <br><br><b><a href=signup.php>$rrerr2</a> </p> "; exit; } if(strlen($_POST['username']) < 4) { print " <P ALIGN='CENTER'> $rrerr3b <br><br><b><a href=signup.php>$rrerr2</a> </p> "; exit; } $sm=100; if($_POST['promo'] == "mafia") { $sm+=100; } $username=$_POST['username']; $username=str_replace(array("<", ">"), array("<", ">"), $username); $q=$db->query("SELECT * FROM users WHERE username='{$username}' OR login_name='{$username}'"); $q2=$db->query("SELECT * FROM users WHERE email='{$_POST['email']}'"); if($db->num_rows($q)) { print " <P ALIGN='CENTER'> $rrerr3 <br><br><b><a href=signup.php>$rrerr2</a> </p> "; exit; } else if($db->num_rows($q2)) { print " <P ALIGN='CENTER'> $rrerr3a <br><br><b><a href=signup.php>$rrerr2</a> <br><br><b><a href=signup.php>$rrerr2</a> </p> "; exit; } else if($_POST['password'] != $_POST['cpassword']) { print " <P ALIGN='CENTER'> $rrerr4 <br><br><b><a href=signup.php>$rrerr2</a> </p> "; exit; } else { $_POST['ref'] = abs((int) $_POST['ref']); $IP = $_SERVER['REMOTE_ADDR']; $IP=addslashes($IP); $IP=mysql_real_escape_string($IP); $IP=strip_tags($IP); $q=$db->query("SELECT * FROM users WHERE lastip='$IP' AND userid={$_POST['ref']}"); if($db->num_rows($q)) { print " <P ALIGN='CENTER'> $nomulti <br><br><b><a href=signup.php>$rrerr2</a> </p>"; exit; } if($_POST['ref']) { $q=$db->query("SELECT * FROM users WHERE userid={$_POST['ref']}"); $r=$db->fetch_row($q); } $db->query("INSERT INTO users (username, display_pic, 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) VALUES( '{$username}', 'http://{$_SERVER['HTTP_HOST']}/images/avatar.gif', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); $i=$db->insert_id(); $db->query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10, 5)"); if($_POST['ref']) { require "global_func.php"; $db->query("UPDATE users SET crystals=crystals+50 WHERE userid={$_POST['ref']}"); event_add($_POST['ref'],"For refering $username to the game, you have earnt 50 valuable crystals!",$c); $db->query("INSERT INTO referals VALUES('', {$_POST['ref']}, $i, unix_timestamp(),'{$r['lastip']}','$IP')"); } print " <P ALIGN='CENTER'>$regsucess <br><br><b><a href=login.php>$reglogin</a> </p> "; } } else { if($set['regcap_on']) { $chars="123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!?\\/%^"; $len=strlen($chars); $_SESSION['captcha']=""; for($i=0;$i<6;$i++) $_SESSION['captcha'].=$chars[rand(0, $len - 1)]; } print " <table width='100%' class='table' cellspacing='1'> <tr> <td width='25%'>$ruser</td> <td width='25%'> <div class='reg_namebox'> <input type=text name=username onkeyup='CheckUsername(this.value);'></td> </div> </div> <td width='50%'><div id='usernameresult'></div></td> </tr> <tr> <td>$rpass</td> <td><div class='reg_namebox'><input type=password id='pw1' name=password onkeyup='CheckPasswords(this.value);PasswordMatch();'></td> </div> <td><div id='passwordresult'></div></td> </tr> <tr> <td>$rcpass</td><td><div class='reg_namebox'><input type=password name=cpassword id='pw2' onkeyup='PasswordMatch();'></td> </div> <td><div id='cpasswordresult'></div></td> </tr> <tr> <td>$remail</td><td> <div class='reg_namebox'> <input type=text name=email onkeyup='CheckEmail(this.value);'></td> </div> <td><div id='emailresult'></div></td> </tr> <tr> <td>$rgender</td> <td ><div class='reg_namebox'><select name='gender' style='width: 120px; height:23px; border:0px; padding:3px 0px 0px 6px; color: white; background-color: #111;' type='dropdown'> <option value='Male'>$rmal</option> <option value='Female'>$rfem</option></select></td></div> </tr> <tr> <td>$rpromo</td><td colspan=2><div class='reg_namebox'><input type=text value='$rnocode' name=promo></td> </div> </tr> <input type=hidden name=ref value='"; if($_GET['REF']) { print $_GET['REF']; } print "' />"; if($set['regcap_on']) { print " <tr> <td colspan=2><img src='captcha_verify.php?bgcolor=C3C3C3' width='170' height='88'/><br /></td> <td><b>Enter Captcha Code</b></td><td colspan=2><div class='reg_namebox'><input type='text' name='captcha' /></td> </tr> "; } print " <tr> <td colspan=3 align=center><div class='reg_nametxt'><input type=submit value=$rreg id='reg_btn' style='color:#000;></td> </tr> </table><div class='regtop'> </div> </form><br />"; } print <<<OUT <!-- Do Not Remove Powered By Ravan Scripts without permission . However, if you would like to use the script without the powered by links you may do so by purchasing a Copyright removal license for a very low fee. --> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> OUT; include "lfooter.php"; ?>
  3. I have learnt some things, don't like it? Piss off and stop being a keyboard warrior. Never hurt anyone asking for help did it? That is the whole point of this section of the forum "support" or do I need to give you a dictionary meaning of the word "support" because I will happily do so ;)
  4. Will have test it out, thank you
  5. Okay, I might just use the code, do I just enter it into my header.php file? And add something like "starter_message" to the user's table so it prevents it from triggering all the time. I only was the mmessage, no need for an event add
  6. Thanks what do I save the php file as? And possibly explain it a little clearer please? Do I add the sql? Is there a code I can save as a .doc or .txt file and it alters the tables or whatever. Sorry I'm just new to most of this, I know some basic stuff, but not everything haha
  7. I'm looking for a welcome message to send to new players as soon as they join from the admin. Can anyone help me please?
  8. Where abouts would I put that? Check my screenshot and you'll see what I mean and where I want.it
  9. Can you delete my other post, not this one, the one I posted before this
  10. [ATTACH]2081[/ATTACH]
  11. I don't know. The only option is probably just to message me on here
  12. I don't use nor have Skype sorry - - - Updated - - -   I don't use nor have Skype sorry
  13. No, I will try explain it a little better but may have to provide some screen shots. It says It's laid out like this, I want next to each car name after where it says if it's in a challenge or no. I will provide screen shots if it's easier easier - - - Updated - - -   No, I will try explain it a little better but may have to provide some screen shots. It says It's laid out like this, I want next to each car name after where it says if it's in a challenge or no. I will provide screen shots if it's easier easier
  14. I want where it says "Tune" I want under it, Tune in green where you can click on it and it takes you to tune.php You may have yo add it to your game to actually see what I mean   garage.php: <?php require_once "globals.php"; if(!$_GET['st'] ) { $_GET['st']=0; } $start=abs((int) $_GET['st']); $cpp=20; print "<div class='generalinfo_txt'> <div><img src='images/info_left.jpg' alt='' /></div> <div class='info_mid'><h2 style='padding-top:10px;'> Garage </h2></div> <div><img src='images/info_right.jpg' alt='' /></div> </div> <div class='generalinfo_simple'> <h3>Your Garage</h3><hr /> > <a href='caryard.php'><font color='red'>Buy A Car (Car Yard)</font></a> > <a href='carmarket.php'><font color='red'>Buy A Car (Car Market)</font></a> > <a href='sellcar.php'><font color='red'>Sell Car (On The Car Market)</font></a><hr /><h3>Your Cars</h3>"; $q=mysql_query("SELECT cpcPLAYER FROM cars_playercars WHERE cpcPLAYER=$userid", $c); $cars=mysql_num_rows($q); $pages=ceil($cars/$cpp); print "Pages: "; for($i=1; $i<=$pages; $i++) { $st=($i-1)*$cpp; if($st == $start) { print "<b>$i</b> "; } else { print "<a href='garage.php?st=$st'>$i</a> "; } } print " <table width=100% border=6> <tr style='background:maroon'><th>Car</th><th>Acceleration</th> <th>Handling</th><th>Speed</th><th>Shield</th><th>In Challenge?</th><th>Tune</th></tr>"; $q=mysql_query("SELECT cp.*, ct.* FROM cars_playercars cp LEFT JOIN cars_types ct ON cp.cpcCAR=ct.carID WHERE cp.cpcPLAYER=$userid LIMIT $start, $cpp", $c); $count=0; $cars=array(); while($r=mysql_fetch_array($q)) { $count++; $acc=$r['cpcACCLV']*$r['carACC']; $han=$r['cpcHANLV']*$r['carHAN']; $spd=$r['cpcSPDLV']*$r['carSPD']; $shd=$r['cpcSHDLV']*$r['carSHD']; $q2=mysql_query("SELECT * FROM challenges WHERE chCHRCAR={$r['cpcID']} AND chSTATUS='open'", $c); if (mysql_num_rows($q) == 0) { $challenge="<font color='red'>blue</font>"; } else { $challenge="<font color='red'>No</font>"; } print "<tr><td>{$r['carNAME']} </td> <td>Lv{$r['cpcACCLV']} ($acc)</td> <td>Lv{$r['cpcHANLV']} ($han)</td> <td>Lv{$r['cpcSPDLV']} ($spd)</td> <td>Lv{$r['cpcSHDLV']} ($shd)</td><td>$challenge</td> </td> </tr>"; $cars[$r['cpcID']]="{$r['carNAME']} - {$r['cpcACCLV']}/{$r['cpcHANLV']}/{$r['cpcSPDLV']}/{$r['cpcSHDLV']}"; } if($count == 0) { print "<tr><th colspan=6>No Cars In Your Garage</th></tr>"; } print "</table>"; $totalraces=$ir['cars_races_won']+$ir['cars_races_lost']; $races_highstakes=$ir['cars_won']+$ir['cars_lost']; if($ir['cars_races_income'] > 0) { $income = '<font color="green">$'.number_format($ir['cars_races_income'])."</font>"; } else if($ir['cars_races_income'] == 0) { $income='$0'; } else { $income = '<font color="red">-$'.number_format(abs($ir['cars_races_income']))."</font>"; } print "<hr /> <h3>Your Driver's Record</h3> <table width=100% border=6> <tr> <td width='50%'>Cars Owned</td> <td width='50%'>{$ir['cars_owned']}</td> </tr> <tr> <td>Cars Won In Races</td> <td>{$ir['cars_won']}</td> </tr> <tr> <td>Cars Lost In Races</td> <td>{$ir['cars_lost']}</td> </tr> <tr> <td>Challenges Sent</td> <td>{$ir['cars_challs_sent']}</td> </tr> <tr> <td>Challenges Accepted</td> <td>{$ir['cars_challs_accpt']}</td> </tr> <tr> <td>Challenges Declined</td> <td>{$ir['cars_challs_decln']}</td> </tr> <tr> <td>Races Won</td> <td>{$ir['cars_races_won']}</td> </tr> <tr> <td>Races Lost</td> <td>{$ir['cars_races_lost']}</td> </tr> <tr> <td>Total Races</td> <td>$totalraces</td> </tr> <tr> <td>Total Income From Betted Races</td> <td>$income</td> </tr> <tr> <td>Friendly Races</td> <td>{$ir['cars_races_friendly']}</td> </tr> <tr> <td>Betted Races</td> <td>{$ir['cars_races_betted']}</td> </tr> <tr> <td>High-Stakes Races</td> <td>{$races_highstakes}</td> </tr> </table>"; print "<hr /> <h3>Pending Challenges To You</h3> <table width='90%'><tr style='background:maroon'> <th>Challenger</th> <th>When Sent?</th> <th>View</th> </tr>"; $q=mysql_query("SELECT c.*,u.* FROM challenges c LEFT JOIN users u ON c.chCHR=u.userid WHERE chCHD=$userid AND chSTATUS = 'open'", $c); if(mysql_num_rows($q) == 0) { print "<tr><th colspan=3>No Pending Challenges</th></tr>"; } else { while($r=mysql_fetch_array($q)) { print "<tr><td>{$r['username']}</td> <td>".date('F j Y, g:i:s a', $r['chTIME'])."</td> <td><a href='viewchallenge.php?id={$r['chID']}'>View</a></td></tr>"; } } print "</table>"; print "<hr /> <h3>Pending Challenges Sent By You</h3> <table width='90%'><tr style='background:maroon'> <th>Challenged</th> <th>When Sent?</th> <th>Cancel</th> </tr>"; $q=mysql_query("SELECT c.*,u.* FROM challenges c LEFT JOIN users u ON c.chCHD=u.userid WHERE chCHR=$userid AND chSTATUS = 'open'", $c); if(mysql_num_rows($q) == 0) { print "<tr><th colspan=3>No Pending Sent Challenges</th></tr>"; } else { while($r=mysql_fetch_array($q)) { print "<tr><td>{$r['username']}</td> <td>".date('F j Y, g:i:s a', $r['chTIME'])."</td> <td><a href='cancelchallenge.php?id={$r['chID']}'>Cancel</a></td></tr>"; } } print "</table>"; if($count > 0) { print "<hr /> <h3 name=\"challenge\">Challenge Someone To A Race</h3>"; foreach($cars as $k => $v) { if($ir['userid'] == 241) { print $k." = ".$v.""; } } print " <form action='makechallenge.php' method='post'> Player ID To Challenge: <input type='text' name='id' value='".$_GET["selectprouser"]."' /> Type: <select name='type' type='dropdown'><option>Friendly</option> <option>Betted</option> <option>High-Stakes</option></select> Car to Use: <select name='car' type='dropdown'>"; foreach($cars as $k => $v) { if($_GET['selectprocar'] == $k) $selected = 'selected'; else $selected = "youwant = \"battlefield 1942 and battlefield 2\""; print "<option value='$k' $selected>$v</option>"; } print "</select> Bet (if Betted Race): <input type='text' name='bet' value='0' /> <input type='submit' value='Send Challenge' /></form>"; } $h->endpage(); ?>   Yes I know I need to convert it properly. But it's working at the moment so I will convert it in the next day or two This part here: print " <table width=100% border=6> <tr style='background:maroon'><th>Car</th><th>Acceleration</th> <th>Handling</th><th>Speed</th><th>Shield</th><th>In Challenge?</th><th>Tune</th></tr>";   - - - Updated - - - I can provide screenshots if need be
  15. I want where it says "Tune" I want under it, Tune in green where you can click on it and it takes you to tune.php You may have yo add it to your game to actually see what I mean   garage.php <?php require_once "globals.php"; if(!$_GET['st'] ) { $_GET['st']=0; } $start=abs((int) $_GET['st']); $cpp=20; print "<div class='generalinfo_txt'> <div><img src='images/info_left.jpg' alt='' /></div> <div class='info_mid'><h2 style='padding-top:10px;'> Garage </h2></div> <div><img src='images/info_right.jpg' alt='' /></div> </div> <div class='generalinfo_simple'><br> <br><br> <h3>Your Garage</h3><hr /> > <a href='caryard.php'><font color='red'>Buy A Car (Car Yard)</font></a><br /> > <a href='carmarket.php'><font color='red'>Buy A Car (Car Market)</font></a><br /> > <a href='sellcar.php'><font color='red'>Sell Car (On The Car Market)</font></a><br /><hr /><h3>Your Cars</h3>"; $q=mysql_query("SELECT cpcPLAYER FROM cars_playercars WHERE cpcPLAYER=$userid", $c); $cars=mysql_num_rows($q); $pages=ceil($cars/$cpp); print "Pages: "; for($i=1; $i<=$pages; $i++) { $st=($i-1)*$cpp; if($st == $start) { print "<b>$i</b> "; } else { print "<a href='garage.php?st=$st'>$i</a> "; } } print "<br /> <table width=100% border=6> <tr style='background:maroon'><th>Car</th><th>Acceleration</th> <th>Handling</th><th>Speed</th><th>Shield</th><th>In Challenge?</th><th>Tune</th></tr>"; $q=mysql_query("SELECT cp.*, ct.* FROM cars_playercars cp LEFT JOIN cars_types ct ON cp.cpcCAR=ct.carID WHERE cp.cpcPLAYER=$userid LIMIT $start, $cpp", $c); $count=0; $cars=array(); while($r=mysql_fetch_array($q)) { $count++; $acc=$r['cpcACCLV']*$r['carACC']; $han=$r['cpcHANLV']*$r['carHAN']; $spd=$r['cpcSPDLV']*$r['carSPD']; $shd=$r['cpcSHDLV']*$r['carSHD']; $q2=mysql_query("SELECT * FROM challenges WHERE chCHRCAR={$r['cpcID']} AND chSTATUS='open'", $c); if (mysql_num_rows($q) == 0) { $challenge="<font color='red'>blue</font>"; } else { $challenge="<font color='red'>No</font>"; } print "<tr><td>{$r['carNAME']} </td> <td>Lv{$r['cpcACCLV']} ($acc)</td> <td>Lv{$r['cpcHANLV']} ($han)</td> <td>Lv{$r['cpcSPDLV']} ($spd)</td> <td>Lv{$r['cpcSHDLV']} ($shd)</td><td>$challenge</td> </td> </tr>"; $cars[$r['cpcID']]="{$r['carNAME']} - {$r['cpcACCLV']}/{$r['cpcHANLV']}/{$r['cpcSPDLV']}/{$r['cpcSHDLV']}"; } if($count == 0) { print "<tr><th colspan=6>No Cars In Your Garage</th></tr>"; } print "</table>"; $totalraces=$ir['cars_races_won']+$ir['cars_races_lost']; $races_highstakes=$ir['cars_won']+$ir['cars_lost']; if($ir['cars_races_income'] > 0) { $income = '<font color="green">$'.number_format($ir['cars_races_income'])."</font>"; } else if($ir['cars_races_income'] == 0) { $income='$0'; } else { $income = '<font color="red">-$'.number_format(abs($ir['cars_races_income']))."</font>"; } print "<hr /> <h3>Your Driver's Record</h3> <table width=100% border=6> <tr> <td width='50%'>Cars Owned</td> <td width='50%'>{$ir['cars_owned']}</td> </tr> <tr> <td>Cars Won In Races</td> <td>{$ir['cars_won']}</td> </tr> <tr> <td>Cars Lost In Races</td> <td>{$ir['cars_lost']}</td> </tr> <tr> <td>Challenges Sent</td> <td>{$ir['cars_challs_sent']}</td> </tr> <tr> <td>Challenges Accepted</td> <td>{$ir['cars_challs_accpt']}</td> </tr> <tr> <td>Challenges Declined</td> <td>{$ir['cars_challs_decln']}</td> </tr> <tr> <td>Races Won</td> <td>{$ir['cars_races_won']}</td> </tr> <tr> <td>Races Lost</td> <td>{$ir['cars_races_lost']}</td> </tr> <tr> <td>Total Races</td> <td>$totalraces</td> </tr> <tr> <td>Total Income From Betted Races</td> <td>$income</td> </tr> <tr> <td>Friendly Races</td> <td>{$ir['cars_races_friendly']}</td> </tr> <tr> <td>Betted Races</td> <td>{$ir['cars_races_betted']}</td> </tr> <tr> <td>High-Stakes Races</td> <td>{$races_highstakes}</td> </tr> </table>"; print "<hr /> <h3>Pending Challenges To You</h3> <table width='90%'><tr style='background:maroon'> <th>Challenger</th> <th>When Sent?</th> <th>View</th> </tr>"; $q=mysql_query("SELECT c.*,u.* FROM challenges c LEFT JOIN users u ON c.chCHR=u.userid WHERE chCHD=$userid AND chSTATUS = 'open'", $c); if(mysql_num_rows($q) == 0) { print "<tr><th colspan=3>No Pending Challenges</th></tr>"; } else { while($r=mysql_fetch_array($q)) { print "<tr><td>{$r['username']}</td> <td>".date('F j Y, g:i:s a', $r['chTIME'])."</td> <td><a href='viewchallenge.php?id={$r['chID']}'>View</a></td></tr>"; } } print "</table>"; print "<hr /> <h3>Pending Challenges Sent By You</h3> <table width='90%'><tr style='background:maroon'> <th>Challenged</th> <th>When Sent?</th> <th>Cancel</th> </tr>"; $q=mysql_query("SELECT c.*,u.* FROM challenges c LEFT JOIN users u ON c.chCHD=u.userid WHERE chCHR=$userid AND chSTATUS = 'open'", $c); if(mysql_num_rows($q) == 0) { print "<tr><th colspan=3>No Pending Sent Challenges</th></tr>"; } else { while($r=mysql_fetch_array($q)) { print "<tr><td>{$r['username']}</td> <td>".date('F j Y, g:i:s a', $r['chTIME'])."</td> <td><a href='cancelchallenge.php?id={$r['chID']}'>Cancel</a></td></tr>"; } } print "</table>"; if($count > 0) { print "<hr /> <h3 name=\"challenge\">Challenge Someone To A Race</h3>"; foreach($cars as $k => $v) { if($ir['userid'] == 241) { print $k." = ".$v."<br>"; } } print " <form action='makechallenge.php' method='post'> Player ID To Challenge: <input type='text' name='id' value='".$_GET["selectprouser"]."' /><br /> Type: <select name='type' type='dropdown'><option>Friendly</option> <option>Betted</option> <option>High-Stakes</option></select><br /> Car to Use: <select name='car' type='dropdown'>"; foreach($cars as $k => $v) { if($_GET['selectprocar'] == $k) $selected = 'selected'; else $selected = "youwant = \"battlefield 1942 and battlefield 2\""; print "<option value='$k' $selected>$v</option>"; } print "</select><br /> Bet (if Betted Race): <input type='text' name='bet' value='0' /><br /> <input type='submit' value='Send Challenge' /></form>"; } $h->endpage(); ?>   Yes I know I need to convert it properly. But it's working at the moment so I will convert it in the next day or two
  16. Thanks mate, hopefully I do not encounter any problems, but I will sure ask if I think I'm stuck, thank you :)
  17. Yeah working perfectly fine mate. But not sure about the other codes that go with this, they all work now that I've converted them, first "proper" conversion I've done, normally I'm lazy and only change include 'global_func.php'; To: include_once 'globals.php';   And remove the header parts and leave all the rest there But going to start converting them properly now I know what I'm doing haha, it looks so much cleaner when you do it properly, looks like I'm going to have to edit a number of my codes to tidy then up :) - - - Updated - - -   Thanks mate, hopefully I don't run into any problems
  18. <?php include 'globals.php'; print "<h3>Car Yard</h3><hr />"; $car=abs((int) $_GET['car']); if($car) { $q=$db->query("SELECT * FROM cars_types WHERE carID={$car} and carBUYABLE=1", $c); if($db->num_rows($q) == 0) { die("Invalid Car"); } $r=$db->fetch_row($q); if($r['carCOST'] > $ir['money']) { die("You do not have enough money to buy this car."); } $db->query("UPDATE users SET money=money-{$r['carCOST']},cars_owned=cars_owned+1 where userid=$userid", $c); $db->query("INSERT INTO cars_playercars VALUES('', $userid, $car, 1, 1, 1, 1)", $c); print "You bought a {$r['carNAME']}!<br /> > <a href='caryard.php'>Back to Caryard</a><br /> > <a href='garage.php'>Goto Your Garage</a><br />"; } else { print "<table width=100% border=6> <tr style='background:black'> <th>Car</th><th>Description</th><th>Base Acceleration</th><th>Base Handling</th><th>Base Speed</th><th>Base Shield</th><th>Price</th><th>Buy</th></tr>"; $q=$db->query("SELECT * FROM cars_types WHERE carBUYABLE=1 ORDER BY carCOST", $c); while($r=$db->fetch_row($q)) { $price='$'.number_format($r['carCOST']); print "<tr><td>{$r['carNAME']}</td><td>{$r['carDESC']}</td> <td>{$r['carACC']}</td> <td>{$r['carHAN']}</td><td>{$r['carSPD']}</td> <td>{$r['carSHD']}</td> <td>$price</td> <td><a href='caryard.php?car={$r['carID']}'>Buy</a></td> </tr>"; } print "</table>"; } $h->endpage(); ?>
  19. I dont have Skype, and got any photos or anything of the script?
  20. How much? And what is the design?
  21. I dont have Skype, but I can send you my email and you can just email it to me?
  22. Archive: chat_master.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of chat_master.zip or chat_master.zip.zip, and cannot find chat_master.zip.ZIP, period. And it won't let me unzip it on my computer
  23. No that's fair enough mate, thank you
  24. Okay, what is an exploit I could possibly use to test my site? This is what I got when I tried an sql injection (not real familiar with them) Hack attempt !!! WARNING !!! Malicious Code Detected! The staff has been notified.
  25. Thanks, is Ravan's secure from Sql injection? If not what are the exploits I look for and patch, that link you supplied is good but confusing. And also thank you for saying sorry, appreciate it
×
×
  • Create New...