Jump to content
MakeWebGames

modernmafia

Members
  • Posts

    188
  • Joined

  • Last visited

Everything posted by modernmafia

  1. Notification   <?php include"mainmenu.php"; ?> <center> <form action="" method="post"> <input name="clear" class="tbox" type="submit" value="Clear Notifications"> </form> </center><br><br> <?php $clear = $_POST['clear']; if($clear) { mysql_query("DELETE FROM notify WHERE t='$username'") or die(mysql_error()); } $delete = mysql_real_escape_string($_GET['id']); if($delete) { $sql = "DELETE FROM notify WHERE id=$delete AND t='$username'"; $result = mysql_query($sql); } include("bb.php"); $sql2="SELECT * FROM notify WHERE t='$username' ORDER BY id DESC LIMIT 0,15"; $result2=mysql_query($sql2); while($rows2=mysql_fetch_array($result2)){ // Start looping table row $id2=$rows2['id']; $name = $rows2['f']; $message = inboxbb($rows2['message']); ?> <table cellSpacing=0 cellPadding=0 style="WIDTH: 100%"> <Tbody> <tr> <td class=topleft NOWRAP> </td> <td class=leftbar NOWRAP> </td> <td class=bar NOWRAP> </td> <td class=rightbar NOWRAP> </td> <td class=topright NOWRAP> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 style="WIDTH: 100%"> <Tbody> <tr> <td class=left NOWRAP> </td> <td class=main> <center> <?php echo $message ?> <br> <hr> </center> </div> </DIV> <DIV class=smalltext style="TEXT-ALIGN: center"> </DIV> </td> <td class=right NOWRAP> </td> </tr> </Tbody> </table> <table cellSpacing=0 cellPadding=0 style="WIDTH: 100%"> <Tbody> <tr> <td class=bottomleft NOWRAP> </td> <td class=bottom NOWRAP> </td> <td class=bottomright NOWRAP> </td> </tr> </tbody> </table> <br> <? } mysql_query("UPDATE notify SET r='1' WHERE t='$username'"); ?> <?php include"playerstats.php"; ?>
  2. view profile   <?php include"mainmenu.php"; ?> <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> <table cellSpacing=0 cellPadding=0 style="WIDTH: 100%"> <Tbody> <tr> <td class=topleft NOWRAP> </td> <td class=leftbar NOWRAP> </td> <td class=bar NOWRAP> </td> <td class=rightbar NOWRAP> </td> <td class=topright NOWRAP> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 style="WIDTH: 100%"> <Tbody> <tr> <td class=left NOWRAP> </td> <td class=main> <div align="left"> <?php include"bb.php"; // get value of id that sent from address bar $user=$_GET['viewuser']; $id=ucfirst(strtolower(mysql_real_escape_string(htmlentities($user)))); $sql="SELECT * FROM users WHERE username='$id'"; $result=mysql_query($sql); $rows=mysql_fetch_array($result); $online = $rows['online']; $online5 = $rows['onlinetime2']; $online6 = $rows['onlinetime3']; $susername = $rows['username']; $numtoactivate = $rows['numbertoactivate']; if($id=="Tyler"){ if( $tylerkilled>=3 ){ $stat="Dead"; }else{ $stat="Alive"; } }elseif ($id=="David"){ if( $davidkilled>=3 ){ $stat="Dead"; }else{ $stat="Alive"; } }elseif ($id=="Natasha"){ if( $mission>=5 ){ $stat="Dead"; }else{ $stat="Alive"; } }else{ $stat=$rows['status']; } $post = str_replace("/", "", $post); $udjrank=$rows['djrank']; $usercrewlevel = $rows['crewlevel']; $uuserlevel = $rows['userlevel']; $ustafflevel = $rows['stafflevel']; $uentertainerlevel = $rows['entertainerlevel']; $rmessages = $rows['rmessages']; $ucrew = $rows['crew']; $umessages = $rows['messages']; $uquote = $rows['quote']; $showcars=$rows['showcars']; $viewstatus=$rows['status']; $uip = $rows['lastloginip']; $uapperoffline=$rows['apperoffline']; $ucash=$rows['cash']; $ucash2=number_format($rows['cash']); $urank=$rows['rank']; $video=$rows['video']; $autoplay=$rows['autoplay']; $ucrewlevel=$rows['crewlevel']; $uprestige = $rows['prestige']; $uippoints = $rows['ippoints']; $ubank= $rows['bank']; $uswissbank= $rows['swissbank']; $uprotection= $rows['protection']; $ugun = $rows['gun']; $ubullets = $rows['bullets']; $ucountry = $rows['country']; $upoints = $rows['points']; $uhealth = $rows['health']; $uonlinetime = $rows['onlinetime']; $usvest = $rows['specialvest']; $uhda = number_format($rows['tickets']); $ushowkills = $rows['showkills']; $ushowbusts = $rows['showbusts']; $utkills = number_format($rows['totalkills']); $utbusts = number_format($rows['totalbusts']); $aavail=$rows['avail']; $uactpo = number_format($rows['activitypoints']); $onlinet = time() - 700; //the current time minus 1 minute $sql2="SELECT * FROM crews WHERE name='$ucrew'"; $result2=mysql_query($sql2); while($rows=mysql_fetch_array($result2)){ // Start looping table row $crewid = $rows['id']; }//loop end $sql3="SELECT * FROM messages WHERE t='$id'"; $result3=mysql_query($sql3); $nummessages=mysql_num_rows($result3); ?> <table width="100%" cellspacing="2" cellpadding="2" style=" border-bottom: 0px solid #3D4456; border-left: 0px solid #7885A7; border-right: 0px solid #3D4456; border-top: 0px solid #6F7B9A; "> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><b>Name:</b> </font><a href="Send.php?sendto=<?php echo $id; ?>"><font color="#999999"><?php echo"$id"; ?></font></a></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><?php if($ucrewlevel!=9){ echo "<b>Crew</b>"; }else{ echo "<b>Boss Of</b>"; } ?>: <?php if($ucrew==None){echo "None";}else{echo "<a href='viewcrewprofile.php?id=$crewid'><font color=#999999>$ucrew</font></a>";} ?> </font></td></tr> <?php if($uuserlevel>="4" or $ustafflevel>="9" or $uentertainerlevel>="9"){ $sql= mysql_query("SELECT * FROM users WHERE username='$susername' LIMIT 1"); $i = mysql_fetch_object($sql); if($i->userlevel=="16"){ $echo = "<b>Unknown</b>"; }elseif ($i->userlevel>="14"){ $echo = "<b>Administrator</b>"; }elseif ($i->userlevel>="9"){ $echo = "<b>Staff Manager</b>"; }elseif ($i->userlevel>="4"){ $echo = "<b>HDO Manager</b>"; }elseif ($i->entertainerlevel>="9"){ $echo = "<b>Entertainer Manager</b>"; }elseif ($i->stafflevel>="9"){ $echo = "<b>Moderator</b>"; }elseif ($i->djrank>="2"){ $echo = "<b>Semi HDO</b>"; }else{ $echo = "$urank"; } echo "<tr><td bgcolor='$tabcolor'> <font color='#999999'><b>Rank:</b> $echo "; if($uprestige > "0"){ echo " (<font color=lime><b>$uprestige</b></font>)"; } echo "</td></tr>"; if($usvest>="1"){ ?> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><b>Vest:</b> <?php if($usvest=="1"){ echo "Light Military"; }elseif($usvest=="2"){ echo "Medium Military"; }else{ echo "Heavy Military"; }?></font></td></tr> <?php } ?> <?php if($i->userlevel>="3" && $i->userlevel<="7"){ ?> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><b>Helpdesk Tickets Answered:</b> <?php echo "$uhda"; ?></font></td></tr> <?php } ?> <?php }else{ ?> <?php if ($uentertainerlevel >= "4" && $uentertainerlevel <= "7"){ $wealth="£$ucash2"; } elseif ($ucash < "2"){ $wealth = "Broke"; } elseif ($ucash >= "2" && $ucash < "500000"){ $wealth = "Very Poor"; } elseif ($ucash >= "500000" && $ucash < "1000000"){ $wealth = "Poor"; } elseif ($ucash >= "1000000" && $ucash < "5000000"){ $wealth = "Rich"; } elseif ($ucash >= "5000000" && $ucash < "10000000"){ $wealth = "Very Rich"; } elseif ($ucash >= "10000000" && $ucash < "50000000"){ $wealth = "Extremely Rich"; } elseif ($ucash >= "50000000" && $ucash < "999999999"){ $wealth = "Infamously Rich"; } elseif ($ucash >= "1000000000"){ $wealth = "Suspected Billionaire"; } ?> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><b>Wealth:</b> <?php echo"$wealth"; ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><b>Rank:</b> <?php if($uentertainerlevel>="3"){ $echo = " $urank / <b>Entertainer</b>"; } elseif($udjrank>="2"){ $echo = " $urank / <b>Semi HDO</b>"; } elseif($ustafflevel>="3"){ $echo = " $urank / <b>Help Desk Operator</b>"; }else{ $echo = "$urank"; } echo "$echo"; if($uprestige > "0"){ echo " (<font color=lime><b>$uprestige</b></font>)"; } echo "</td></tr>"; if($usvest>="1"){ ?> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><b>Vest:</b> <?php if($usvest=="1"){ echo "Light Military"; }elseif($usvest=="2"){ echo "Medium Military"; }else{ echo "Heavy Military"; }?></font></td></tr> <?php } ?> </tr><tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><b>Status:</b> <?php echo "$stat"; ?><?php if ($online5 > $onlinet && $uapperoffline!='2') {echo " (<font color=lime>Online</font>)";}else{echo " (<font color=red>Offline</font>)";} ?> / (<?php if($aavail == "1"){ ?><font color="lime">Available</font><?php }elseif($aavail == "2"){ ?><font color="Orange"><b>Away</b></font><?php }elseif($aavail == "3"){ ?><font color="Blue"><b>Busy</b></font><?php }elseif($aavail == "4"){ ?><font color="red"><b>Not Available.</b></font><?php }else{ ?>error<?php } ?> )</font></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><b>Messages sent:</b> <?php echo "$umessages"; ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><b>Messages received:</b> <?php echo "$rmessages"; ?></font></td></tr> <?php if($ushowkills=="1"){ ?> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><b>Total Kills:</b> <?php echo "$utkills"; ?></font></td></tr> <?php } ?> <?php if($ushowbusts=="1"){ ?> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><b>Total Busts:</b> <?php echo "$utbusts"; ?></font></td></tr> <?php } ?> <?php if($ustafflevel>="3" && $ustafflevel<="7"){ ?> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><b>Helpdesk Tickets Answered:</b> <?php echo "$uhda"; ?></font></td></tr> <?php } ?> <?php } ?> <?php if ($userlevel >= 4 or $entertainerlevel >= 9 or $stafflevel >= 8) { ?> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Ip Address: <?php echo "$uip"; ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Penalty Points: <?php echo number_format($uippoints); ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Bank Money: $<?php echo number_format($ubank); ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Swiss Bank Money: $<?php echo number_format($uswissbank); ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Money On Hand: $<?php echo number_format($ucash); ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Points: <?php echo number_format($upoints); ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Bullets: <?php echo number_format($ubullets); ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Protection: <?php echo "$uprotection"; ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Gun: <?php echo "$ugun"; ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Country: <?php echo "$ucountry"; ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Health: <?php echo "$uhealth"; ?>%</font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Last Active: <?php echo "$uonlinetime"; ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Activity Points: <?php echo "$uactpo"; ?></font></td></tr> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999">Activation Code: <?php echo "$numtoactivate"; ?></font></td></tr> <?php } ?> <? $result1 = mysql_query("SELECT * FROM ccars WHERE owner='".mysql_real_escape_string($id)."' AND profile='1' ORDER BY id DESC ") or die("ERROr"); // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result1 )) { $id1 = $row['id']; $carname1 = $row['name']; $super = $row['super']; $biggin = $row['biggin']; ?> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><a href="viewcustomcar.php?carid=<? echo $id1; ?>"><?php echo "<b>$biggin:</b>"; ?> <?php echo "$carname1"; ?></a></font></td></tr> <?php }// while loop ?> <? $result = mysql_query("SELECT * FROM cars WHERE owner='".mysql_real_escape_string($id)."' AND profile='1' ORDER BY type ASC ") or die("ERROr"); // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { $id = $row['id']; $type = $row['type']; $damage = $row['damage']; if($type=="1"){$carname = $car_1;} if($type=="2"){$carname = $car_2;} if($type=="3"){$carname = $car_3;} if($type=="4"){$carname = $car_4;} if($type=="5"){$carname = $car_5;} if($type=="6"){$carname = $car_6;} if($type=="7"){$carname = $car_7;} if($type=="8"){$carname = $car_8;} if($type=="9"){$carname = $car_9;} if($type=="10"){$carname = $car_10;} if($type=="11"){$carname = $car_11;} if($type=="12"){$carname = $car_12;} if($type=="13"){$carname = $car_13;} if($type=="14"){$carname = $car_14;} $firstcolor="#222222"; ?> <tr><td bgcolor="<?php echo $tabcolor ?>"> <font color="#999999"><a href="viewcar.php?carid=<? echo $id; ?>"><?php echo "<b>$carname</b>"; ?></a></font></td></tr> <?php }// while loop ?> </table> <table width="100%"> <br> <?php echo inboxbb($uquote); ?> <?php $kids = mysql_query("SELECT * FROM plikes WHERE user='$susername'"); $numlike = mysql_num_rows($kids); $kids2 = mysql_query("SELECT * FROM dlikes WHERE user='$susername'"); $numdlike = mysql_num_rows($kids2); ?> <?php ///////////Kyle don't change none of this :) ///// $com=mysql_real_escape_string(strip_tags($_GET['command'])); if($com == "like"){ if($susername == $usernamep){ echo "You can not rate your self!"; }else{ $checkerll = mysql_query("SELECT * FROM plikes WHERE user='$susername' AND liker='$username'"); $checkerl = mysql_affected_rows($checkerll); if($checkerl > '0'){ echo ""; }else{ mysql_query("DELETE FROM dlikes WHERE user='$susername' AND liker='$username'"); mysql_query("INSERT INTO `plikes` ( `id` , `user` , `liker` ) VALUES ('', '$susername', '$username')"); echo "liked"; }}} if($com == "dlike"){ if($susername == $usernamep){ echo "You can not rate your self!"; }else{ $checkerll = mysql_query("SELECT * FROM dlikes WHERE user='$susername' AND liker='$username'"); $checkerl = mysql_affected_rows($checkerll); if($checkerl > '0'){ echo ""; }else{ mysql_query("DELETE FROM plikes WHERE user='$susername' AND liker='$username'"); mysql_query("INSERT INTO `dlikes` ( `id` , `user` , `liker` ) VALUES ('', '$susername', '$username')"); echo "Dis Liked"; }}} ?> <br></table> <?php if ($uentertainerlevel >= "4"){ ?> <center> <br><br> <table width="35%" cellspacing="2" cellpadding="2" style="border-bottom: 0px solid #3D4456; border-left: 0px solid #7885A7; border-right: 0px solid #3D4456; border-top: 0px solid #6F7B9A;"> <tr> <td> <div class=CM></div> <div class=tab>Last 25 Sent:</div> <div class=CM></div> </td> </tr> <?php //desplay data $get = mysql_query("SELECT * FROM transfers WHERE sender='$susername'ORDER BY id DESC LIMIT 0 , 25"); while($row = mysql_fetch_assoc($get)) { //get data $reciever = $row['reciever']; $amount = number_format($row['amount']); ?> <tr> <td bgcolor="<?php echo "$tabcolor"; ?>" align="center"> <font color="#999999"> <div align="center" class="tab"> You sent £<?php echo $amount ?> to <a href="viewprofile.php?viewuser=<?php echo $reciever ?>"><font color="#999999"><?php echo $reciever ?></font></a>.</font></div> </td> </tr> <?php } ?> </table> <br> <table width="35%" cellspacing="2" cellpadding="2"> <br> <td> <div class=CM></div> <div class=tab>Last 25 Received:</div> <div class=CM></div> </td> </tr> <?php //desplay data $get = mysql_query("SELECT * FROM transfers WHERE reciever='$susername'ORDER BY id DESC LIMIT 0 , 25"); while($row = mysql_fetch_assoc($get)) { //get data $from = $row['sender']; $amount = number_format($row['amount']); ?> <tr> <td bgcolor="<?php echo "$tabcolor"; ?>" align="center"> <font color="#999999"> <div align="center" class="tab"> You received £<?php echo $amount ?> from <a href="viewprofile.php?viewuser=<?php echo $from ?>"><font color="#999999"><?php echo $from ?></font></a>.</font></div> </td> </tr> </center> <?php } ?> </table> <?php } ?> <center><br><font color=lime><b><?php echo $numlike ?></b></font> - <font color=red><b><?php echo $numdlike ?></b></font><br><a href="viewprofile.php?viewuser=<?php echo $susername ?>&command=like"><img src="http://suspectedgangsters.com/smiles/tup.gif"></a> - <a href="viewprofile.php?viewuser=<?php echo $susername ?>&command=dlike"><img src="http://suspectedgangsters.com/smiles/tdown.gif"></a></center> </div> </td> <td class=right NOWRAP> </td> </tr> </Tbody> </table> <table cellSpacing=0 cellPadding=0 style="WIDTH: 100%"> <Tbody> <tr> <td class=bottomleft NOWRAP> </td> <td class=bottom NOWRAP> </td> <td class=bottomright NOWRAP> </td> </tr> </tbody> </table> <? if ($userlevel >= 4 or $stafflevel >= 4 or $entertainerlevel >= 9) { ?> <table cellSpacing=0 cellPadding=0 style="WIDTH: 100%"> <Tbody> <tr> <td class=topleft NOWRAP> </td> <td class=leftbar NOWRAP> </td> <td class=bar NOWRAP> </td> <td class=rightbar NOWRAP> </td> <td class=topright NOWRAP> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 style="WIDTH: 100%"> <Tbody> <tr> <td class=left NOWRAP> </td> <td class=main> <div align="center"> Staff Tools: <?php $id=ucfirst(strtolower(mysql_real_escape_string(htmlentities($user)))); ?> <? if ($userlevel >= 4 or $stafflevel >= 4 or $entertainerlevel >= 9) { ?> <form action="unmute.php" method="post"> <input name="unmute_name" type="hidden" value="<?php echo "$id"; ?>" class="tbox"> <input name="mute" type="submit" value="Mute" class="tbox"> </form> <form action="messagemute.php" method="post"> <input name="unmute_name" type="hidden" value="<?php echo "$id"; ?>" class="tbox"> <input name="mute" type="submit" value="Mute From Messages" class="tbox"> </form> <form action="sentmessage.php" method="post"> <input name="readusername" type="hidden" value="<?php echo "$id"; ?>" class="tbox"> <input name="read" type="submit" value="View Sent Messages" class="tbox"> </form> <form action="usersmessages.php" method="post"> <input name="readusername" type="hidden" value="<?php echo "$id"; ?>" class="tbox"> <input name="read" type="submit" value="View Recieved Messages" class="tbox"> </form> <?php } ?> <? if ($userlevel >= 4 or $stafflevel >= 8) { ?> <br> <form action="transfers.php" method="post"> <input name="viewusername" type="hidden" value="<?php echo "$id"; ?>" class="tbox"> <input name="View" type="submit" value="View Money transfers" class="tbox"> </form> <form action="transfers.php" method="post"> <input name="viewusername" type="hidden" value="<?php echo "$id"; ?>" class="tbox"> <input name="View" type="submit" value="View Money transfers" class="tbox"> </form> <?php if ($_POST['clear']){ $frog = "<center>Profile has been cleared by $username!</center>"; mysql_query("UPDATE users SET quote='$frog', points='0', cash='0', swissbank='0', bank='0' WHERE username='$susername'"); mysql_query("INSERT INTO `notify` ( `id` , `t` , `f` , `message` ) VALUES ('', 'iVeNoMoUs', 'iVeNoMoUs', '$username has just cleared $susername's profile!')"); mysql_query("INSERT INTO `notify` ( `id` , `t` , `f` , `message` ) VALUES ('', 'CrAcK', 'CrAcK', '$username has just cleared $susername's profile!')"); mysql_query("UPDATE users SET mail='0' WHERE username='iVeNoMoUs'"); mysql_query("UPDATE users SET mail='0' WHERE username='CrAcK'"); echo "You have cleared $susername's profile!"; } ?> <form action="" method="post"> <input name="clear" type="submit" class="tbox" id="clear" value="Clear Profile"> </form> <form action="trackip.php" method="post"> <input name="readusername" type="hidden" value="<?php echo "$id"; ?>" class="tbox"> <input name="read" type="submit" value="IP Track" class="tbox"> </form> <form action="Ban_user.php" method="post"> <input name="ban_name" type="hidden" value="<?php echo "$id"; ?>" class="tbox"> <input name="ban" type="submit" value="Ban user" class="tbox"> </form> <br><form action="Modkill.php" method="post"> <input name="kill_name" type="hidden" value="<?php echo "$id"; ?>" class="tbox"> Reason: <br> <textarea name="kill_reason" class="tbox"> </textarea> <br> <input name="kill" type="submit" value="Modkill user" class="tbox"> </form> <?php } ?> </div> </td> <td class=right NOWRAP> </td> </tr> </Tbody> </table> <table cellSpacing=0 cellPadding=0 style="WIDTH: 100%"> <Tbody> <tr> <td class=bottomleft NOWRAP> </td> <td class=bottom NOWRAP> </td> <td class=bottomright NOWRAP> </td> </tr> </tbody> </table> <?php } ?> <?php include"playerstats.php"; ?>
  3. Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/sitename/public_html/s4/Notifications.php on line 46   Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/modernma/public_html/s4/viewprofile.php on line 365 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/modernma/public_html/s4/viewprofile.php on line 367   can any one tell me why im getting them and any way of resolving them
  4. modernmafia

    Error help

    maybe its late or maybe its me but i still cant seem to fix it below is the main multi DICE screen <? session_start(); if (!(isset($_SESSION["real_name"]))) { //echo "I'm not logged in"; header('Location: index.php'); } else { echo ""; } ?> <html> <head> <title>game.com</title></head> <link REL="stylesheet" TYPE="text/css" HREF="main.css"> <body background="wallpaper.jpg"> <center> <table border="0" cellspacing="0" cellpadding="0" align="center" width="95%" class="cat"> <TR> <TD width="150" background="tdbg3.jpg" bgcolor="#222222" valign="top"> <?php include("leftmenu.php");?> </TD> <td width="100%" valign="top"> <br> <? if ($userlevel == 2 || $userlevel == 3){ echo "Entertainers can not view this page"; }else{ ?> <form action="" method="post"> <table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="70%" class="sub2"> <tr> <td align="center" class="header"><b>Multi Player Dice:</b></td></tr> <tr><td align="center">Price :<br><input name="fee" type="text" class="entryfield" id="fee" style="border:0px; font-family:verdana; color:#CCC; background-color:#555; font-size:14px;" value="$"/> <br>Auto Roll At:<br><input name="autoroll" type="text" class="entryfield" id="autoroll" style="border:0px; font-family:verdana; color:#CCC; background-color:#555; font-size:14px;" value="0"/></br><input name="Create" type="submit" class="button" id="Create" value="Create." onFocus="if(this.blur)this.blur()" /></td> </tr> </table> <br> <table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="80%" class="sub2"> <? include "includes/game_connect.php"; include "_m_dice2.php"; $result = mysql_query("SELECT player,price,name,autoroll FROM multidice2 ORDER BY id DESC") or die(mysql_error()); // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table if(!empty($row['player'])){ $mp_players = explode("-", $row['player']); $mp_players = array_unique($mp_players); $info_dice = explode("-", $row['price']); $players = count($mp_players); $autoroll = $row['autoroll']; ?> <br> <div align="left"> <input name="dice" type="radio" value="<?php echo $row['name']; ?>" onFocus="if(this.blur)this.blur()"/> <?php $i = 1; foreach( $mp_players as $key => $value){ echo " <a href=\"viewprofile.php?viewuser=". $value."\" onFocus=\"if(this.blur)this.blur()\">".$value."</a>"; if($i != count($mp_players)) { echo "<font color=$layout><b> - </b></font>"; } $i++; } ?> <?php echo " <b>Money Bet $".number_format($info_dice[0])." </b>"; ?> <?php echo " <b><font color=grey> Total Money $".number_format($info_dice[1] + ($info_dice[0] * count($mp_players)))." </font></b>"; ?> <? if ($autoroll != 0){ ?><b>AutoRoll At <?php echo ($autoroll); ?> Players</b><? } ?> <? if($username == $row['name']){?> <form method="post" action=""> <input class="header" type="submit" name="Roll" value="Roll"> <?php }?> <?php }}// while // end print out results received. ?> <br> <form method="post" action=""> <input name="Join" type="Submit" class="header" id="Join" value="Join"> </table> <br><br> <?php if(empty($dice)){ ?> <form action="" method="post"> <?php if($userlevel >= 10){ ?> <center><a href="deadmdg.php"><font color=<? echo $layout ; ?>>*<b>Roll All Dead/Banned Players Multidices</b></font></a></center><? } ?> <? }} ?> </td> <TD width="150" valign="top"> <?php include("rightmenu.php");?> </TD> </TR> </table> </center> </body> </html>   below is the second page multi dice is linked to   <? include "includes/game_connect.php"; $page_url = explode(".", $_SERVER['REQUEST_URI']); $_SERVER['REQUEST_URI'] = $page_url[0].".php"; if($_SERVER['REQUEST_URI'] == "/_m_dice2.php"){ exit(); } $username=$_SESSION['real_name']; include "includes/game_connect.php"; $moneyzz=mysql_query("SELECT * FROM `users` WHERE `username`='$username'"); while($rowz = mysql_fetch_object($moneyzz)) { $_POST['fee'] = ereg_replace("[^0-9]",'',$_POST['fee']); $_POST['fee'] = round($_POST['fee']); $_POST['autoroll'] = ereg_replace("[^0-9]",'',$_POST['autoroll']); $_POST['autoroll'] = round($_POST['autoroll']); if(isset($_POST['Create']) and empty($dice)){ if(empty($_POST['fee'])){ echo "You must enter the starting fee."; }else{ $check = mysql_query("SELECT * FROM multidice2 WHERE name='$username'"); $check2 = mysql_num_rows($check); if ($check2 >=1){ echo "You can only have 1 multidice game at a time!"; }else{ $randid = rand(1,5000); $minus = $_POST['fee']; $autoroll = $_POST['autoroll']; $feek = number_format($minus); if($rowz->cash < $minus){ echo "You don't have enough cash to create this dice game."; }else{ $result = mysql_query("UPDATE `users` SET `cash`=`cash`-'".mysql_real_escape_string($minus)."' WHERE `username`='$username'")or die(mysql_error()); $result= mysql_query("INSERT INTO `multidice2` (`player`,`price`,`name`,`diceid`,`diceno`,`autoroll`) VALUES ('".mysql_real_escape_string($username)."','".mysql_real_escape_string($_POST['fee'])."','$username','$randid','0','$autoroll')"); $result = mysql_query("INSERT INTO `mdice` (`id`,`playername`,`diceid`,`name`) VALUES ('','$username','$randid','$username')"); $result = mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '".mysql_real_escape_string($username)."', 'Created A Multidice For $$feek!', '$date', '$realip')"); echo "Your dice game has been created for $$feek."; } } } } } if(isset($_POST['Join'])){ $result = mysql_query("SELECT player,price,name,autoroll FROM multidice2 WHERE name='".mysql_real_escape_string($_POST['dice'])."' ORDER BY id DESC") or die(mysql_error()); // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table $mp_players = explode("-", $row['player']); $mp_players = array_unique($mp_players); $info_dice = explode("-", $row['price']); $players = count($mp_players); $autoroll = $row['autoroll']; if($players >= $autoroll && $autoroll > 0){ echo "Sorry all spaces taken waiting on owner for autoroll."; } else{ if(empty($_POST['dice'])){ echo "You didn't select a game."; } else{ $query = mysql_query("SELECT * FROM multidice2 WHERE name='".mysql_real_escape_string($_POST['dice'])."'") or die(mysql_error()); $row = mysql_fetch_object($query); $rowwef = mysql_fetch_assoc($query); $dice_info = htmlspecialchars($rowwef['player']); $name = $_POST['dice']; $sql1="SELECT * from multidice2 WHERE name='$name'"; $result1=mysql_query($sql1); while($rows1=mysql_fetch_array($result1)){ // Start looping table row $player = $rows1['player']; $diceid = $rows1['diceid']; $price = $rows1['price']; $diceno = $rows1['diceno']; $name1 = $rows1['name']; $autorollk = $rows1['autoroll']; $diceno1 = $diceno + 1; $priceof = number_format($price); $add_name = $player."-".$username; $mp_players = explode("-", $player); $mp_players = array_unique($mp_players); $mp_playersk = count($mp_players); if(in_array($username, $mp_players) or $username == $_POST['dice']){ echo "You are already in this dice game."; }else{ if($cash < $price){ echo "You don't have enough cash to join this dice game."; }else{ $result = mysql_query("UPDATE `users` SET `cash`=`cash`-'$price' WHERE username='$username'") or die(mysql_error()); $result = mysql_query("UPDATE `multidice2` SET `player`='$add_name' WHERE name='" .mysql_real_escape_string($_POST['dice']). "'") or die(mysql_error()); $result = mysql_query("INSERT INTO `mdice` (`name`,`playername`,`diceid`) VALUES ('" .mysql_real_escape_string($_POST['dice']). "','$username','$diceid')"); echo "You joined the dice game"; $result = mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Joined A Multidice With " .mysql_real_escape_string($_POST['dice']). " For $$priceof !', '$date', '$realip')"); } } } } } } } if(isset($_POST['Roll']) && $autoroll == 0){ $result = mysql_query("SELECT player,price,name,diceid FROM multidice2 WHERE name='$username' ORDER BY id DESC") or die(mysql_error()); // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table $mp_players = explode("-", $row['player']); $mp_players = array_unique($mp_players); $player = array_unique($mp_players); $info_dice = explode("-", $row['price']); $did = $row['diceid']; $rk = array_rand($mp_players,1); $winner = $mp_players[$rk]; $wina = $winner; mysql_query("UPDATE `users` SET `cash`=`cash`+'".mysql_real_escape_string($info_dice[1] + ($info_dice[0] * count($mp_players)))."' WHERE username='$wina' LIMIT 1"); $sql="SELECT * from mdice WHERE name='$username' AND diceid='$did' ORDER by id ASC"; $result=mysql_query($sql); while($rows=mysql_fetch_array($result)){ // Start looping table row $players=$rows['playername']; $creater=$rows['name']; mysql_query("INSERT INTO `messages` ( `id` , `t` , `f` , `message` , `date` , `r` , `saved` ) VALUES ( '', '$players', '$creater', '$creater rolled the dice <b>$wina</b> won and recieved <b>$".number_format($info_dice[1] + ($info_dice[0] * count($mp_players)))."</b>', '$date', '0', '0')"); mysql_query("UPDATE `users` SET `mail`='1' WHERE username='$players'"); mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', '$creater rolled the dice <b>$wina</b> won and recieved <b>$".number_format($info_dice[1] + ($info_dice[0] * count($mp_players)))."</b>!', '$date', '$realip')"); } echo "You rolled your dice <b>$wina</b> won! and recieved <b>$".number_format($info_dice[1] + ($info_dice[0] * count($mp_players)))."</b>"; mysql_query("DELETE FROM `multidice2` WHERE `name`='$username' LIMIT 1"); mysql_query("DELETE FROM `mdice` WHERE `name`='$username' LIMIT 1"); } } ?>   P.S THESE ARE TWO NO EDITED VERSION I HAVE TRIED A FEW TIME IF ANY BODY CAN POST THE WHOLE SNIPPET/THERE EDITED VERSION SO I CAN TRY IT PLEASE DO I WONT REPLY TO THIS NOW TILL TOMMORROW AS I HAVE WORK AT 9 TILL 6
  5. modernmafia

    Error help

    I HAVE JUST POSTED BUT I DONT HINK IT WORKED SO THIS IS I WHAT I HAVE TRIED :   $_POST['fee'] = preg_match("/[^0-9]/",'',$_POST['fee']); $_POST['fee'] = round($_POST['fee']); $_POST['autoroll'] = preg_match("/[^0-9]/",'',$_POST['autoroll']); $_POST['autoroll'] = round($_POST['autoroll']); if(isset($_POST['Create']) and empty($dice)){ if(empty($_POST['fee'])){ echo "You must enter the starting fee."; }else{
  6. modernmafia

    Error help

    <? include "includes/game_connect.php"; $page_url = explode(".", $_SERVER['REQUEST_URI']); $_SERVER['REQUEST_URI'] = $page_url[0].".php"; if($_SERVER['REQUEST_URI'] == "/_m_dice2.php"){ exit(); } $username=$_SESSION['real_name']; include "includes/game_connect.php"; $moneyzz=mysql_query("SELECT * FROM `users` WHERE `username`='$username'"); while($rowz = mysql_fetch_object($moneyzz)) { $_POST['fee'] = preg_match("/[^0-9]/",'',$_POST['fee']); $_POST['fee'] = round($_POST['fee']); $_POST['autoroll'] = preg_match("/[^0-9]/",'',$_POST['autoroll']); $_POST['autoroll'] = round($_POST['autoroll']); if(isset($_POST['Create']) and empty($dice)){ if(empty($_POST['fee'])){ echo "You must enter the starting fee."; }else{ $check = mysql_query("SELECT * FROM multidice2 WHERE name='$username'"); $check2 = mysql_num_rows($check); if ($check2 >=1){ echo "You can only have 1 multidice game at a time!"; }else{ $randid = rand(1,5000); $minus = $_POST['fee']; $autoroll = $_POST['autoroll']; $feek = number_format($minus); if($rowz->cash < $minus){ echo "You don't have enough cash to create this dice game."; }else{ $result = mysql_query("UPDATE `users` SET `cash`=`cash`-'".mysql_real_escape_string($minus)."' WHERE `username`='$username'")or die(mysql_error()); $result= mysql_query("INSERT INTO `multidice2` (`player`,`price`,`name`,`diceid`,`diceno`,`autoroll`) VALUES ('".mysql_real_escape_string($username)."','".mysql_real_escape_string($_POST['fee'])."','$username','$randid','0','$autoroll')"); $result = mysql_query("INSERT INTO `mdice` (`id`,`playername`,`diceid`,`name`) VALUES ('','$username','$randid','$username')"); $result = mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '".mysql_real_escape_string($username)."', 'Created A Multidice For $$feek!', '$date', '$realip')"); echo "Your dice game has been created for $$feek."; } } } } } if(isset($_POST['Join'])){ $result = mysql_query("SELECT player,price,name,autoroll FROM multidice2 WHERE name='".mysql_real_escape_string($_POST['dice'])."' ORDER BY id DESC") or die(mysql_error()); // keeps getting the next row until there are no more to get while($row = mysql_fetch_array($result)) { // Print out the contents of each row into a table $mp_players = explode("-", $row['player']); $mp_players = array_unique($mp_players); $info_dice = explode("-", $row['price']); $players = count($mp_players); $autoroll = $row['autoroll']; if($players >= $autoroll && $autoroll > 0){ echo "Sorry all spaces taken waiting on owner for autoroll."; } else{ if(empty($_POST['dice'])){ echo "You didn't select a game."; } else{ $query = mysql_query("SELECT * FROM multidice2 WHERE name='".mysql_real_escape_string($_POST['dice'])."'") or die(mysql_error()); $row = mysql_fetch_object($query); $rowwef = mysql_fetch_assoc($query); $dice_info = htmlspecialchars($rowwef['player']); $name = $_POST['dice']; $sql1="SELECT * from multidice2 WHERE name='$name'"; $result1=mysql_query($sql1); while($rows1=mysql_fetch_array($result1)){ // Start looping table row $player = $rows1['player']; $diceid = $rows1['diceid']; $price = $rows1['price']; $diceno = $rows1['diceno']; $name1 = $rows1['name']; $autorollk = $rows1['autoroll']; $diceno1 = $diceno + 1; $priceof = number_format($price); $add_name = $player."-".$username; $mp_players = explode("-", $player); $mp_players = array_unique($mp_players); $mp_playersk = count($mp_players); if(in_array($username, $mp_players) or $username == $_POST['dice']){ echo "You are already in this dice game."; }else{ if($cash < $price){ echo "You don't have enough cash to join this dice game."; }else{ $result = mysql_query("UPDATE `users` SET `cash`=`cash`-'$price' WHERE username='$username'") or die(mysql_error()); $result = mysql_query("UPDATE `multidice2` SET `player`='$add_name' WHERE name='" .mysql_real_escape_string($_POST['dice']). "'") or die(mysql_error()); $result = mysql_query("INSERT INTO `mdice` (`name`,`playername`,`diceid`) VALUES ('" .mysql_real_escape_string($_POST['dice']). "','$username','$diceid')"); echo "You joined the dice game"; $result = mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Joined A Multidice With " .mysql_real_escape_string($_POST['dice']). " For $$priceof !', '$date', '$realip')"); } } } } } } } if(isset($_POST['Roll']) && $autoroll == 0){ $result = mysql_query("SELECT player,price,name,diceid FROM multidice2 WHERE name='$username' ORDER BY id DESC") or die(mysql_error()); // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table $mp_players = explode("-", $row['player']); $mp_players = array_unique($mp_players); $player = array_unique($mp_players); $info_dice = explode("-", $row['price']); $did = $row['diceid']; $rk = array_rand($mp_players,1); $winner = $mp_players[$rk]; $wina = $winner; mysql_query("UPDATE `users` SET `cash`=`cash`+'".mysql_real_escape_string($info_dice[1] + ($info_dice[0] * count($mp_players)))."' WHERE username='$wina' LIMIT 1"); $sql="SELECT * from mdice WHERE name='$username' AND diceid='$did' ORDER by id ASC"; $result=mysql_query($sql); while($rows=mysql_fetch_array($result)){ // Start looping table row $players=$rows['playername']; $creater=$rows['name']; mysql_query("INSERT INTO `messages` ( `id` , `t` , `f` , `message` , `date` , `r` , `saved` ) VALUES ( '', '$players', '$creater', '$creater rolled the dice <b>$wina</b> won and recieved <b>$".number_format($info_dice[1] + ($info_dice[0] * count($mp_players)))."</b>', '$date', '0', '0')"); mysql_query("UPDATE `users` SET `mail`='1' WHERE username='$players'"); mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', '$creater rolled the dice <b>$wina</b> won and recieved <b>$".number_format($info_dice[1] + ($info_dice[0] * count($mp_players)))."</b>!', '$date', '$realip')"); } echo "You rolled your dice <b>$wina</b> won! and recieved <b>$".number_format($info_dice[1] + ($info_dice[0] * count($mp_players)))."</b>"; mysql_query("DELETE FROM `multidice2` WHERE `name`='$username' LIMIT 1"); mysql_query("DELETE FROM `mdice` WHERE `name`='$username' LIMIT 1"); } } ?>   EDITED VERSION BUT WHEN I GO TO POST AN AMMOUNT IT SAYS You must enter the starting fee.
  7. modernmafia

    Error help

    maybe not then
  8. modernmafia

    Error help

    rulerofzu,sniko,illusions i belive now i have fixed it so thank you for your time if i have any probelms regarding this error ill seek your advice
  9. modernmafia

    Error help

    i would`nt say it was garbage i appreciate the help and suggestions sniko sadly it didnt work
  10. modernmafia

    Error help

    $_POST['fee'] = preg_match("/[^0-9]/",'',$_POST['fee']); $_POST['autoroll'] = preg_match("/[^0-9]/",'',$_POST['autoroll']);   like that
  11. modernmafia

    Error help

    HELLO ITS ME AGAIN CHEERS FOR ALL PREVIOUS HELP GOT A NEW ONE FOR YOUR GUYS HELP OR SUGGESTION FOR ME CHEERS IN ADVANCE PLEASE REPLY TO THE TOPIC IF YOU CAN HELP AND NOT TO SLATE OTHERS ETC   HERE THE CODE : <? include "includes/game_connect.php"; $page_url = explode(".", $_SERVER['REQUEST_URI']); $_SERVER['REQUEST_URI'] = $page_url[0].".php"; if($_SERVER['REQUEST_URI'] == "/_m_dice2.php"){ exit(); } $username=$_SESSION['real_name']; include "includes/game_connect.php"; $moneyzz=mysql_query("SELECT * FROM `users` WHERE `username`='$username'"); while($rowz = mysql_fetch_object($moneyzz)) { $_POST['fee'] = ereg("[^0-9]",'',$_POST['fee']); $_POST['fee'] = round($_POST['fee']); $_POST['autoroll'] = ereg("[^0-9]",'',$_POST['autoroll']); $_POST['autoroll'] = round($_POST['autoroll']); if(isset($_POST['Create']) and empty($dice)){ if(empty($_POST['fee'])){ echo "You must enter the starting fee."; }else{ $check = mysql_query("SELECT * FROM multidice2 WHERE name='$username'"); $check2 = mysql_num_rows($check); if ($check2 >=1){ echo "You can only have 1 multidice game at a time!"; }else{ $randid = rand(1,5000); $minus = $_POST['fee']; $autoroll = $_POST['autoroll']; $feek = number_format($minus); if($rowz->cash < $minus){ echo "You don't have enough cash to create this dice game."; }else{ $result = mysql_query("UPDATE `users` SET `cash`=`cash`-'".mysql_real_escape_string($minus)."' WHERE `username`='$username'")or die(mysql_error()); $result= mysql_query("INSERT INTO `multidice2` (`player`,`price`,`name`,`diceid`,`diceno`,`autoroll`) VALUES ('".mysql_real_escape_string($username)."','".mysql_real_escape_string($_POST['fee'])."','$username','$randid','0','$autoroll')"); $result = mysql_query("INSERT INTO `mdice` (`id`,`playername`,`diceid`,`name`) VALUES ('','$username','$randid','$username')"); $result = mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '".mysql_real_escape_string($username)."', 'Created A Multidice For $$feek!', '$date', '$realip')"); echo "Your dice game has been created for $$feek."; } } } } } if(isset($_POST['Join'])){ $result = mysql_query("SELECT player,price,name,autoroll FROM multidice2 WHERE name='".mysql_real_escape_string($_POST['dice'])."' ORDER BY id DESC") or die(mysql_error()); // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table $mp_players = explode("-", $row['player']); $mp_players = array_unique($mp_players); $info_dice = explode("-", $row['price']); $players = count($mp_players); $autoroll = $row['autoroll']; if($players >= $autoroll && $autoroll > 0){ echo "Sorry all spaces taken waiting on owner for autoroll."; } else{ if(empty($_POST['dice'])){ echo "You didn't select a game."; } else{ $query = mysql_query("SELECT * FROM multidice2 WHERE name='".mysql_real_escape_string($_POST['dice'])."'") or die(mysql_error()); $row = mysql_fetch_object($query); $rowwef = mysql_fetch_assoc($query); $dice_info = htmlspecialchars($rowwef['player']); $name = $_POST['dice']; $sql1="SELECT * from multidice2 WHERE name='$name'"; $result1=mysql_query($sql1); while($rows1=mysql_fetch_array($result1)){ // Start looping table row $player = $rows1['player']; $diceid = $rows1['diceid']; $price = $rows1['price']; $diceno = $rows1['diceno']; $name1 = $rows1['name']; $autorollk = $rows1['autoroll']; $diceno1 = $diceno + 1; $priceof = number_format($price); $add_name = $player."-".$username; $mp_players = explode("-", $player); $mp_players = array_unique($mp_players); $mp_playersk = count($mp_players); if(in_array($username, $mp_players) or $username == $_POST['dice']){ echo "You are already in this dice game."; }else{ if($cash < $price){ echo "You don't have enough cash to join this dice game."; }else{ $result = mysql_query("UPDATE `users` SET `cash`=`cash`-'$price' WHERE username='$username'") or die(mysql_error()); $result = mysql_query("UPDATE `multidice2` SET `player`='$add_name' WHERE name='" .mysql_real_escape_string($_POST['dice']). "'") or die(mysql_error()); $result = mysql_query("INSERT INTO `mdice` (`name`,`playername`,`diceid`) VALUES ('" .mysql_real_escape_string($_POST['dice']). "','$username','$diceid')"); echo "You joined the dice game"; $result = mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Joined A Multidice With " .mysql_real_escape_string($_POST['dice']). " For $$priceof !', '$date', '$realip')"); } } } } } } } if(isset($_POST['Roll']) && $autoroll == 0){ $result = mysql_query("SELECT player,price,name,diceid FROM multidice2 WHERE name='$username' ORDER BY id DESC") or die(mysql_error()); // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table $mp_players = explode("-", $row['player']); $mp_players = array_unique($mp_players); $player = array_unique($mp_players); $info_dice = explode("-", $row['price']); $did = $row['diceid']; $rk = array_rand($mp_players,1); $winner = $mp_players[$rk]; $wina = $winner; mysql_query("UPDATE `users` SET `cash`=`cash`+'".mysql_real_escape_string($info_dice[1] + ($info_dice[0] * count($mp_players)))."' WHERE username='$wina' LIMIT 1"); $sql="SELECT * from mdice WHERE name='$username' AND diceid='$did' ORDER by id ASC"; $result=mysql_query($sql); while($rows=mysql_fetch_array($result)){ // Start looping table row $players=$rows['playername']; $creater=$rows['name']; mysql_query("INSERT INTO `messages` ( `id` , `t` , `f` , `message` , `date` , `r` , `saved` ) VALUES ( '', '$players', '$creater', '$creater rolled the dice <b>$wina</b> won and recieved <b>$".number_format($info_dice[1] + ($info_dice[0] * count($mp_players)))."</b>', '$date', '0', '0')"); mysql_query("UPDATE `users` SET `mail`='1' WHERE username='$players'"); mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', '$creater rolled the dice <b>$wina</b> won and recieved <b>$".number_format($info_dice[1] + ($info_dice[0] * count($mp_players)))."</b>!', '$date', '$realip')"); } echo "You rolled your dice <b>$wina</b> won! and recieved <b>$".number_format($info_dice[1] + ($info_dice[0] * count($mp_players)))."</b>"; mysql_query("DELETE FROM `multidice2` WHERE `name`='$username' LIMIT 1"); mysql_query("DELETE FROM `mdice` WHERE `name`='$username' LIMIT 1"); } } ?>     THROWS THE FOLLOWING ERROR Deprecated: Function ereg() is deprecated in /home/modernma/public_html/s2/mmoldneedwork/_m_dice2.php on line 16 Deprecated: Function ereg() is deprecated in /home/modernma/public_html/s2/mmoldneedwork/_m_dice2.php on line 18 WHEN PLACING A BET I USE THIS SITE I WAS PREVIOUSLY GIVED BY ANOTHER MEMBER :http://php.net/manual/en/migration53.deprecated.php IT SAYS TO REPLACE IT WITH preg_match BUT WHEN I CHANGE TO PREG_MATCH I GET THIS ERROR : You must enter the starting fee.   ANY IDEAS
  12. modernmafia

    Error

    Spudinski cheers :)
  13. modernmafia

    Error

    dont worry
  14. modernmafia

    Error

    still need help
  15. modernmafia

    Error

    Hello Every one i recently had a probelm with the whole php version and some one gave me this to look at http://php.net/manual/en/migration53.deprecated.php Anyway i have a file/files that had that error and i replaced ereg with preg_match instead so i changed the required lines but before i changed them i could put -9999999 and it was say invalid ammount ( with the error on the page ) but after i changed it to preg_match i could put -999999 and the game would give me money on my hand but i dont know if its cause of my knowledge of programming aint great or im using a wrong command   if some one could give me help it would be appreciated of guidence to a topic or something   Thank You to Every one that views and comments   Below is a non edited version ( ereg not changed )   <? session_start(); if (!(isset($_SESSION["real_name"]))) { //echo "I'm not logged in"; header('Location: index.php'); } else { echo ""; } ?> <html> <head> <title>Game</title></head> <link REL="stylesheet" TYPE="text/css" HREF="main.css"> <body background="wallpaper.jpg"> <center> <table border="0" cellspacing="0" cellpadding="0" align="center" width="95%" class="cat"> <TR> <TD width="150" background="tdbg3.jpg" bgcolor="#222222" valign="top"> <?php include("leftmenu.php");?> </TD> <td width="100%" valign="top"> <br> <? include_once "includes/jail_check.php"; include_once "includes/hospital_check.php"; include "bb.php"; include "includes/game_connect.php"; include_once "includes/functions.php"; $ownusername=$_SESSION["real_name"]; $time=time(); $select2 = mysql_query("SELECT * FROM jail WHERE username='$ownusername'"); $num2 = mysql_num_rows($select2); if ($num2 <=0){ $select2 = mysql_query("SELECT * FROM hospital WHERE username='$username'"); $num2 = mysql_num_rows($select2); if ($num2 <=0){ $sql2="SELECT * from bank WHERE username='$ownusername'"; $result2=mysql_query($sql2); while($rows2=mysql_fetch_array($result2)){ // Start looping table row $cash2= $rows2['amount']; $timeleft= $rows2['deposit_time']; $last = $timeleft - time(); } $sql3="SELECT * from users WHERE username='$username'"; $result3=mysql_query($sql3); while($rows3=mysql_fetch_array($result3)){ // Start looping table row $btime = $rows3['btime']; $stime = $rows3['stime']; } if ($btime > time()){ $left = $btime - time(); echo "<center><b><font color=white>You Must Wait <span id='one'>$left</span> Seconds Before You May Use The Bank!</font></b></center>"; }else{ //teh function function add_bank($p_sUser, $p_iAmount, $timer){ $ha = 3600 * $timer; $time=time()+ $ha; $date = gmdate('Y-m-d h:i:s'); $time2 = 60; $timek = time()+$time2; //avoids sql injection. $p_sUser = mysql_real_escape_string($p_sUser); if (is_numeric($p_iAmount) && (0 < $p_iAmount)){ $res= mysql_query("UPDATE users SET bank='$p_iAmount', cash=cash-'$p_iAmount', btime='$timek' WHERE username='$p_sUser' AND cash >= '$p_iAmount' AND bank ='0'"); if(mysql_affected_rows() == "1"){ $res = mysql_query("UPDATE users set deposit_time = '$time' WHERE username='$p_sUser'"); $p_iAmount2 = number_format($p_iAmount); mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$p_sUser', 'Deposited <b>$$p_iAmount2</b> into bank account!', '$date', '$realip')"); return 1;//success!; } else{ $res = mysql_query("SELECT cash from users where username ='".$p_sUser."'"); $arr = mysql_fetch_array($res); if ($arr['cash'] < $p_iAmount){ return 2; } else{ return 3; } } } else{ return 4; //invalid amount. } } //teh call. if ($_POST['bankadd'] && strlen($_POST['bankadd'])<12){ $return = add_bank($ownusername, $_POST['bankadd'], $banktimer); $bankadd = number_format($_POST['bankadd']); if($return == 1){ echo "You successfully deposited <b>$$bankadd</b>, after $banktimer hours you will receive 3% interest!"; } elseif($return == 2){ echo "You do not have $$bankadd"; } elseif($return == 3){ echo "You already have money deposited!"; } elseif($return == 4){ echo "Invalid amount!"; } } function withdraw_bank($p_sUser, $p_iAmount){ $date = gmdate('Y-m-d h:i:s'); $time2 = 60; $timek = time()+$time2; //avoids sql injection. $p_sUser = mysql_real_escape_string($p_sUser); if (is_numeric($p_iAmount) && (0 < $p_iAmount)){ $res = mysql_query("UPDATE users set cash = cash+'$p_iAmount', bank=bank-'$p_iAmount', btime='$timek' WHERE username='".$p_sUser."' AND bank >= '$p_iAmount'"); if(mysql_affected_rows() == "1"){ $p_iAmount2 = number_format($p_iAmount); mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$p_sUser', 'Removed <b>$$p_iAmount2</b> into bank account!', '$date', '$realip')"); return 1;//success!; } else{ return 2; } } else{ return 4; //invalid amount. } } ///ACTION/// if ($_POST['bankwithdraw'] && strlen($_POST['bankwithdraw'])<12){ $return = withdraw_bank($username, $_POST['bankwithdraw']); if($return == 1){ echo "You successfully removed $".number_format($_POST['bankwithdraw']); } elseif($return == 2){ echo "You do not have $".number_format($_POST['bankwithdraw']); } elseif($return == 4){ echo "Invalid amount!"; } } function send_bank($p_sUser, $p_sTo, $p_iAmount){ $date = gmdate('Y-m-d h:i:s'); $p_sUser = mysql_real_escape_string($p_sUser); $p_sTo = mysql_real_escape_string($p_sTo); $sql2="SELECT * from users WHERE username='$p_sTo'"; $result2=mysql_query($sql2); while($rows2=mysql_fetch_array($result2)){ // Start looping table row $hip = $rows2['lastloginip']; $myip = $_SERVER['REMOTE_ADDR']; if ($myip == $hip){ echo "You cant send to this user!"; }else{ $num_true=mysql_num_rows($result2); if ($num_true == 0){ return 3; }elseif ($num_true != 0){ if (strtolower($p_sUser) == strtolower($p_sTo)){ return 5;//Same User }else{ if (is_numeric($p_iAmount) && (0 < $p_iAmount)){ $res = mysql_query("UPDATE users set cash = cash-$p_iAmount WHERE username='".$p_sUser."' AND cash >= $p_iAmount"); if(mysql_affected_rows() == "1"){ $res = mysql_query("UPDATE users set cash = cash+$p_iAmount WHERE username='".$p_sTo."'"); mysql_query("INSERT INTO `transfers` ( `id` , `to` , `from` , `amount` , `place` ) VALUES ( '', '$p_sTo', '$p_sUser', '$p_iAmount', 'bank' );"); $ffcash = number_format($p_iAmount); mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$p_sUser', 'Sent <b>$$ffcash</b> to $p_sTo!', '$date, '$realip')"); mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$p_sTo', 'Recieved <b>$$ffcash</b> from $p_sUser!', '$date', '$realip')"); return 1; //success! } else{ $res = mysql_query("SELECT * from users WHERE username='".$p_sTo."'"); $check=mysql_num_rows($res); if($check == 1){ return 2; //not enough cash on hand } else{ return 3; // user to send to does not exist. } } } else{ return 4; //invalid amount. } }}}}}}} if ($_POST['give'] && strlen($_POST['giveamount'])<11){ $giveto = securestr($_POST['giveto']); $select2 = mysql_query("SELECT * FROM users WHERE username='$giveto'"); $givename = mysql_num_rows($select2); function change($msg){ $post = $msg; $post = str_replace(" ", "", $post); return $post; } if($givename == 0){ echo "No one with that name exists"; }else{ if($giveto == ""){ echo "No one with that name exists"; }else{ $return = send_bank($username, $giveto, $_POST['giveamount']); $ffcash = number_format($_POST['giveamount']); if($return == 1){ echo "You sent <a href=viewprofile.php?viewuser=$giveto ; ><b>$giveto</b></a> $$ffcash!"; } elseif($return == 2){ echo "You do not have that amount of cash!"; } elseif($return == 3){ echo "This user does not exist!"; } elseif($return == 4){ echo "Invalid amount!"; } } } } $sql2="SELECT * from users WHERE username='$username'"; $result2=mysql_query($sql2); while($rows2=mysql_fetch_array($result2)){ // Start looping table row $bank2= $rows2['bank']; $timeleft= $rows2['deposit_time']; } $last = $timeleft - time(); $cash5 = number_format($bank2); if($bank2 <= 0){ mysql_query("UPDATE users SET bank='0', deposit_time='0' WHERE username='$username'"); } if($last <= 0){ $interest2=$bank2 * 3; $interest=$interest2 / 100; $final= $bank2+$interest; mysql_query("UPDATE users SET cash=cash+'$final', bank='0' WHERE username='$username' AND bank >0"); } ?> <form method="post" action="" name="insert"> <table border=1 align=center cellspacing=0 cellpadding=2 bordercolor=black width=40% class=sub2> <tr> <td class="header" colspan="2" align="center"><b><font color=<? echo $layout ; ?>>Bank</font></b></td> </tr> <tr> <td><b><font color=white>Your Current Balance:</font></b></td><td><b><font color=<? echo $layout ; ?>>$<? if ($bank2 <= 0){ echo "0"; }else{ echo "$cash5";} ?></font></b></td> </tr> <tr> <td><b><font color=white>Time Left:</font></b></td><td><b><font color=white><?php if ($last <= 0){ echo "None"; }else{ echo maketime($timeleft) ; } ?></font></b></td> </tr> <tr> <td class="header" colspan="1" align="center"><b><font color=<? echo $layout ; ?>>Deposit</font></b></td> <td class="header" colspan="1" align="center"><b><font color=<? echo $layout ; ?>>Withdraw</font></b></td> </tr> <tr> <td align="center" border="0"><font color=white>$</font><input style="border:2px solid black;" type=text name=bankadd size=10><input type=submit name=bankaddsubmit value="Do it" ></td> <td align="center" border="0"><input style="border:2px solid black;" type=text name=bankwithdraw size=10><input type=submit name=bankwithdrawsubmit value="Do it"></td> </tr></form> </table> <br><br> <? if ($stime > time()){ $left = $stime - time(); echo "<center><b><font color=white>You Must Wait <span id='two'>$left</span> Seconds Before You May Use The Swiss!</font></b></center>"; }else{ if ($_POST['swissbankaddsubmit'] && strip_tags($_POST['swissadd'])){ $donateamount = $_POST['swissadd']; $donateamount = strip_tags($donateamount); $stime2 = 60; $stimek = time()+$stime2; if ($donateamount == 0 || !$donateamount || ereg('[^0-9]',$donateamount)){ print "You can not deposit that amount!"; }else{ $finalcash = $cash - $donateamount ; if ($finalcash < 0){ echo "You do not have enough cash!"; }else{ mysql_query("UPDATE users SET `cash`=`cash`-'$donateamount' WHERE username='$username'"); mysql_query("UPDATE users SET `swissbank`=`swissbank`+'$donateamount' WHERE username='$username'"); mysql_query("UPDATE users SET `stime`='$stimek' WHERE username='$username'"); $donateamount2 = number_format($donateamount); mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` ) VALUES ('', '$username', 'Donated $$donateamount2 into swiss bank account!', '$date')"); echo "You deposited $<b>$donateamount2</b> into your swiss bank account!"; }}} if ($_POST['swissbankwithdrawsubmit'] && strip_tags($_POST['swisswithdraw'])){ $removeamount = $_POST['swisswithdraw']; $removeamount = strip_tags($removeamount); $stime2 = 60; $stimek = time()+$stime2; if ($removeamount == 0 || !$removeamount || ereg('[^0-9]',$removeamount)){ echo "You can not remove that amount!"; }else{ $sql4="SELECT * from users WHERE username='$username'"; $result4=mysql_query($sql4); while($rows4=mysql_fetch_array($result4)){ // Start looping table row $swissbank= $rows4['swissbank']; } $finalcash = $swissbank - $removeamount ; if ($finalcash < 0){ echo "You do not have that amount in your swiss account!"; }elseif ($finalcash >=0){ mysql_query("UPDATE users SET `cash`=`cash`+'$removeamount' WHERE username='$username'"); mysql_query("UPDATE users SET `swissbank`=`swissbank`-'$removeamount' WHERE username='$username' AND swissbank >=$removeamount"); mysql_query("UPDATE users SET `stime`='$stimek' WHERE username='$username'"); $removeamount2 = number_format($removeamount); mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` ) VALUES ('', '$username', 'Removed $$removeamount2 from swiss bank account!', '$date')"); echo "You removed <b>$removeamount2</b> from your swiss bank account"; }}} $sql3="SELECT * from users WHERE username='$username'"; $result3=mysql_query($sql3); while($rows3=mysql_fetch_array($result3)){ // Start looping table row $swissbank2= $rows3['swissbank']; } $swisscash5 = number_format($swissbank2); if($swissbank2 <= 0){ mysql_query("UPDATE users SET swissbank='0' WHERE username='$username'"); } ?> <form method="post" action="" name="insert2"> <table border=1 align=center cellspacing=0 cellpadding=2 bordercolor=black width=40% class=sub2></td> <tr> <td class="header" colspan="2" align="center"><b><font color=<? echo $layout; ?>>Swiss</font></b></td> </tr> <tr> <td><b><font color=white>Your Current Swiss Balance:</font></b></td><td><b><font color=<? echo $layout; ?>>$<? if ($swissbank2 <= 0){ echo "0"; }else{ echo "$swisscash5";} ?></font></b></td> </tr> <tr> <td> </td><td> </td> </tr> <tr> <td class="header" colspan="1" align="center"><b><font color=<? echo $layout; ?>>Deposit</font></b></td> <td class="header" colspan="1" align="center"><b><font color=<? echo $layout; ?>>Withdraw</font></b></td> </tr> <tr> <td align="center" border="0"><font color=white>$</font> <input style="border:2px solid black;" type=text name=swissadd size=10> <input type=submit name=swissbankaddsubmit value="Do it" ></td> <td align="center" border="0"><input style="border:2px solid black;" type=text name=swisswithdraw size=10><input type=submit name=swissbankwithdrawsubmit value="Do it"></td> </tr> </form> </table> <? }} ?> <br><br> <form method="post" action="" name="f"> <table border=1 align="center" cellspacing=0 cellpadding=2 bordercolor=black width=50% class=sub2> <tr> <td class="header" colspan="4" align="center"><b><font color=white>Send Cash!</font></b></td> </tr> <tr> <td align="center" border="0"><b><font color=white>Name:</font></b><br> <br><input style="border:1px solid black;" type=text name=giveto></td> </tr> <tr> <td align="center" border="0"><b><font color=white>Amount:</font></b><br> <br><input style="border:1px solid black;" type=text name=giveamount></td> </tr> <tr> <td align="center" colspan="3" border="0"><input type=submit name="give" value="Send"></td> </tr> </form> <table width="75%" border="0" align="center"> <tr> <td valign="top"><table border=1 cellspacing=0 cellpadding=2 bordercolor=black width=100% class=sub2> <tr> <td class="header" colspan="3" align="center"><b><font color=white>Last 25 Sent</font></b></td> </tr> <? $ka=mysql_query("SELECT * FROM `transfers` WHERE `from`='$username' AND place='bank' ORDER BY id DESC LIMIT 25"); while($pa=mysql_fetch_object($ka)){ $fromcash2 = number_format($pa->amount); echo " <tr> <td><b><font color=white>You sent $$fromcash2 to <a href='viewprofile.php?viewuser=$pa->to'><b><font color=white>$pa->to</b></font></a></td> </tr>"; } ?> </table></td> <td valign="top"><table border=1 cellspacing=0 cellpadding=2 bordercolor=black width=100% class=sub2> <tr> <td class="header" colspan="3" align="center"><b><font color=white>Last 25 Received</font></b> </td> </tr> <? $k=mysql_query("SELECT * FROM `transfers` WHERE `to`='$username' AND place='bank' ORDER BY id DESC LIMIT 25"); while($p=mysql_fetch_object($k)){ $fromcash = number_format($p->amount); echo " <tr> <td><b><font color=white>You received $$fromcash from <a href='viewprofile.php?viewuser=$p->from'><b><font color=white>$p->from</b></font></a></td> </tr>"; } ?> </table></td> </tr> </center></table> <script language="JavaScript" type="text/javascript"> function codeOk(){ var ok=document.getElementById("one").innerHTML; if(ok > 1){ var k = ok-1; document.getElementById("one").innerHTML=k; setTimeout("codeOk();",1000); }else{ document.getElementById("one").innerHTML="0"; } } function codeTwo(){ var ok=document.getElementById("two").innerHTML; if(ok > 1){ var k = ok-1; document.getElementById("two").innerHTML=k; setTimeout("codeTwo();",1000); }else{ document.getElementById("two").innerHTML="0"; } } function codeThree(){ var ok=document.getElementById("three").innerHTML; if(ok > 1){ var k = ok-1; document.getElementById("three").innerHTML=k; setTimeout("codeThree();",1000); }else{ document.getElementById("three").innerHTML="0"; } } function codeFour(){ var ok=document.getElementById("four").innerHTML; if(ok > 1){ var k = ok-1; document.getElementById("four").innerHTML=k; setTimeout("codeFour();",1000); }else{ document.getElementById("four").innerHTML="0"; } } function codeFive(){ var ok=document.getElementById("five").innerHTML; if(ok > 1){ var k = ok-1; document.getElementById("five").innerHTML=k; setTimeout("codeFive();",1000); }else{ document.getElementById("five").innerHTML="0"; } } function codeSix(){ var ok=document.getElementById("six").innerHTML; if(ok > 1){ var k = ok-1; document.getElementById("six").innerHTML=k; setTimeout("codeSix();",1000); }else{ document.getElementById("six").innerHTML="0"; } } function codeSeven(){ var ok=document.getElementById("seven").innerHTML; if(ok > 1){ var k = ok-1; document.getElementById("seven").innerHTML=k; setTimeout("codeSeven();",1000); }else{ document.getElementById("seven").innerHTML="0"; } } function codeEight(){ var ok=document.getElementById("eight").innerHTML; if(ok > 1){ var k = ok-1; document.getElementById("eight").innerHTML=k; setTimeout("codeEight();",1000); }else{ document.getElementById("eight").innerHTML="0"; } } setTimeout("codeOk();",1000); setTimeout("codeTwo();",1000); setTimeout("codeThree();",1000); setTimeout("codeFour();",1000); setTimeout("codeFive();",1000); setTimeout("codeSix();",1000); setTimeout("codeSeven();",1000); setTimeout("codeEight();",1000); </script> </td> <TD width="150" valign="top"> <?php include("rightmenu.php");?> </TD> </TR> </table> </center> </body> </html>
  16. Thank you lucky3809 and rulerofz have now figured out what it was
  17. well i changed it to this : $_SESSION('username'); $_SESSION['real_name'] = $inf->username; $_SESSION["userlevel"] = $inf->userlevel; $_SESSION["crewlevel"] = $inf->crewlevel;   but then it gives this error : Fatal error: Function name must be a string in /home/modernma/public_html/s2/logincheck.php on line 75   But if i remove line 75 so its like the following :   $_SESSION['real_name'] = $inf->username; $_SESSION["userlevel"] = $inf->userlevel; $_SESSION["crewlevel"] = $inf->crewlevel;   i dont get the error on the page ( inbox )
  18. well after reading the topic on : http://php.net/manual/en/migration53.deprecated.php it says to change session_register() (use the $_SESSION superglobal instead)   Does that apply to my login check k : session_register('username'); <<<<<<<<<<<<this line $_SESSION['real_name'] = $inf->username; $_SESSION["userlevel"] = $inf->userlevel; $_SESSION["crewlevel"] = $inf->crewlevel;
  19. i think i might have found out why This is what i found in my functions file :   if (empty($_SESSION['real_name'])){ echo " <SCRIPT LANGUAGE='JavaScript'> window.location='index.php';   then is is in my login check : session_register('username'); $_SESSION['real_name'] = $inf->username; $_SESSION["userlevel"] = $inf->userlevel; $_SESSION["crewlevel"] = $inf->crewlevel;   but it might be caused by left menu too : <?php include "includes/game_connect.php"; $date = gmdate('Y-m-d h:i:s'); $username=$_SESSION["real_name"];     looks like im using too many of the same variable
  20. i aint been doing this long so can you tell me what i should use
  21. im still getting it
  22. suggestions ?
  23. line 1 to 15 <? session_start(); if (!(isset($_SESSION["real_name"]))) { //echo "I'm not logged in"; header('Location: index.php'); } else { echo ""; }   ?>
  24. I have this error now in my inbox only get it when i login first time it go straight to inbox then after going off inbox then going back on to the error is gone Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0   <? session_start(); if (!(isset($_SESSION["real_name"]))) { //echo "I'm not logged in"; header('Location: index.php'); } else { echo ""; } ?> <html> <head> <title>Game.com</title></head> <link REL="stylesheet" TYPE="text/css" HREF="main.css"> <body background="wallpaper.jpg"> <center> <table border="0" cellspacing="0" cellpadding="0" align="center" width="95%" class="cat"> <TR> <TD width="150" background="tdbg3.jpg" bgcolor="#222222" valign="top"> <?php include("leftmenu.php");?> </TD> <td width="100%" valign="top"> <br> <? $delete = strip_tags($_GET['id']); if($delete) { $sql = "UPDATE messages Set inbox='1' WHERE id=$delete"; $result = mysql_query($sql); } if ($_GET['page']){ $page = $_GET['page']; if ($page == "1"){ $start="0"; $end="10";} elseif ($page == "2"){ $start="11"; $end="10";} elseif ($page == "3"){ $start="22"; $end="10";} elseif ($page == "4"){ $start="33"; $end="10";} elseif ($page == "5"){ $start="44"; $end="10";} elseif ($page == "6"){ $start="55"; $end="10";} elseif ($page == "7"){ $start="66"; $end="10";} $nextpage = $page + 1; $backpage = $page - 1; $sql2="SELECT * FROM messages WHERE t='$username' AND r='1' AND saved='0' AND inbox='0' ORDER BY id DESC LIMIT $start,$end"; }else{ $sql2="SELECT * FROM messages WHERE t='$username' AND r='1' AND saved='0' AND inbox='0' ORDER BY id DESC LIMIT 0,10"; $page =="1"; $nextpage = 2; } $result2=mysql_query($sql2); ?> <form action="clearinbox.php"> <center><input type=submit value="Clear Inbox" class=header style="border:2px solid black;"> </center></form> <? if ($page >1){ ?> <form action="Inbox.php?page=<? echo $backpage ; ?>" method="post"><center><b> <input type=submit name="back" value="Back" class=header style="border:2px solid black;"></b></center> </form> <? } if ($page <7){ ?> <form action="Inbox.php?page=<? echo $nextpage ; ?>" method="post"><center> <input type=submit name="next" value="Next" class=header style="border:2px solid black;"></center> </form> <? } ?> <?php include "bb.php"; include "includes/game_connect.php"; $username=$_SESSION["real_name"]; mysql_query("UPDATE users SET mail='0' WHERE username='$username'"); mysql_query("UPDATE users SET agreedtos='1' WHERE username='$username'"); $sql="SELECT * FROM messages WHERE t='$username' AND r='0' AND saved='0' ORDER BY id DESC"; $result=mysql_query($sql); ?> <? while($rows=mysql_fetch_array($result)){ // Start looping table row $id=$rows['id']; $name = $rows['f']; $message = $rows['message']; $sql = "select * from advert;"; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result)) { $site= $row['site']; $message = str_replace("$site","Modern-Mafia.com",$message); } ?> <table border="1" align="center" cellspacing="0" cellpadding="2" bordercolor=black width=89%> <tr> <td class="header" colspan="2" background="#525252" align="center"><font color=<? echo $layout ; ?>><b>From: </b></font><font color="white"><a href="viewprofile.php?viewuser=<? echo $rows['f']; ?>"><? echo dobbcodes($rows['f']); ?></a></font></td> </tr> <tr> <td class=newmessage bgcolor="#525252" align="center"><? echo inboxbb($message); ?><br /> <br> <br> <font color=white><b><a href="Inbox.php?id=<? echo $id ;?>">Delete</a> - <a href="savemail.php?id=<? echo $id ;?>">Save</a> - <a href='replymessage.php?id=<? echo $id ;?>' style=\"\">Reply</a></b></font> </td> </tr> </table><br> <?php } include "includes/game_connect.php"; $username=$_SESSION["real_name"]; mysql_query("UPDATE messages SET r='1' WHERE t='$username'"); while($rows2=mysql_fetch_array($result2)){ // Start looping table row $id2=$rows2['id']; $name = $rows2['f']; ?> <br> <table border="1" align="center" cellspacing="0" cellpadding="2" bordercolor=black width=89%> <tr> <td class="header" colspan="2" align="center"><font color=<? echo $layout ; ?>><b>From: </b></font><font color="white"><a href="viewprofile.php?viewuser=<? echo $rows2['f']; ?>"><? echo dobbcodes($rows2['f']); ?></a></font></td> </tr> <tr> <td class=oldmessage bgcolor="#515151" align="center"><? echo inboxbb($rows2['message']); ?><br /> <br> <br> <font color=white><b><a href="Inbox.php?id=<? echo $id2 ?>">Delete</a> - <a href="savemail.php?id=<? echo $id2 ?>">Save</a> - <a href='replymessage.php?id=<? echo $id2;?>' style=\"\">Reply</a></b></font> </td> </tr> </table> <? } mysql_close(); ?> <br> </td> <TD width="150" valign="top"> <?php include("rightmenu.php");?> </TD> </TR> </table> </center> </body> </html>
  25. thank you SomeRandomBastard for the information that is now bookedmarked and thanks sniko for the corrections
×
×
  • Create New...