Jump to content

thegod

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Everything posted by thegod

  1. Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in what does this mean
  2. do but only the back ground comes out now help me ??? please
  3. if i killed the users account so if they banned and DEAD JUST TELLIN ME what is what
  4. /////Rankl1123467 $administrator= mysql_num_rows(mysql_query("SELECT username FROM user_info WHERE rank = 'Administrator'"))or die(mysql_error()); /////Rankl11234678 $hdo= mysql_num_rows(mysql_query("SELECT username FROM user_info WHERE rank = 'Help Desk Oparator'"))or die(mysql_error()); /////user_info DEAD $dead= mysql_num_rows(mysql_query("SELECT username FROM user_info WHERE status = 'Dead'"))or die(mysql_error()); /////TOTAL ATTEMPTS $attempts= mysql_num_rows(mysql_query("SELECT id FROM attempts WHERE outcome = 'Survived'"))or die(mysql_error()); $result11111swiss = mysql_query("SELECT money FROM swiss"); $moneyswiss = 0; while($rowswiss=mysql_fetch_array($result11111swiss)){ $moneyswiss+=$rowswiss[0];
  5. Parse error: parse error, unexpected T_VARIABLE in rankstatus.php on line 110 this is the 2nd line is 110 i have no idea DEAD $dead= mysql_num_rows(mysql_query("SELECT username FROM user_info WHERE status = 'Dead'"))or die(mysql_error()); many thanks
  6. here is the coding when people reply use a textarea it does submit it into the database look i marked it in red <? include_once 'includes/functions.php'; include_once 'includes/replace.php'; logincheck(); $forum=$_GET['forum']; $username=$_SESSION['username']; $viewtopic = $_GET['viewtopic']; $forum_look=$_GET['forum_look']; $fetch=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$username'")); $forumquote = mysql_query("SELECT * FROM user_info WHERE username = '$right->username'"); $fq = mysql_fetch_object($forumquote); if (!$viewtopic){ $viewtopic = "1"; } $fetch=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$username'")); if ($forum == "Crew" && $fetch->crew != "0"){ $crew="1"; } $owner=mysql_num_rows(mysql_query("SELECT * FROM crews WHERE owner='$username' OR rhm='$username'")); $userlevel=$fetch->userlevel; $ggee = mysql_query("SELECT locked, sticky, lastreply FROM topics WHERE id='$viewtopic' AND forum='$forum'"); while($dsdsd = mysql_fetch_row($ggee)){ $lockedornot = $dsdsd[0]; $stikornot = $dsdsd[1]; $lastreplyit = $dsdsd[2]; } if ($lockedornot == '1'){ echo "This topic is locked."; }elseif ($userlevel != '0' || $lockedornot != '1'){ if ($crew == "1"){ $gg = mysql_query("SELECT * FROM topics WHERE id='$viewtopic' AND forum='$forum' AND crew='$fetch->crew'"); }else{ $gg = mysql_query("SELECT * FROM topics WHERE id='$viewtopic' AND forum='$forum'"); } while($success = mysql_fetch_row($gg)){ $username1 = $success[1]; $topictext = $success[3]; $made = $success[8]; } $forumquote2 = mysql_query("SELECT * FROM user_info WHERE username = '$username1'"); $fq2 = mysql_fetch_object($forumquote2); ?> <style type="text/css"> <!-- .style2 {font-size: 10px} --> </style> <link href="includes/forum.css" rel="stylesheet" type="text/css"> <table width=100% border=1 cellpadding=0 cellspacing=0 bordercolor=#000000 class=thinline> <tr> <td class="header" colspan=2><center>Topic Made By : <? echo "<a href='profile.php?viewuser=$username1' target=mainFrame>$username1</a>"; ?> On :<?php echo "$made"; ?></td> </tr> <tr> <td width='8%' rowspan='3' bgcolor=#777777> <center> <img src='<? echo"$fq2->forumpic"; ?>' hight='65' width='65' align='center'> <span class=style2><? echo"$fq2->posts"; ?> Posts</span> </td> </tr> <tr> <td height="134" bgcolor="#777777"> <? echo replace($topictext); if ($topictext == ""){ $topictext = "Main Forum";}?></td> </tr> <tr> <td height='21' colspan='1' bgcolor=#777777> <div align=center><? echo"$fetch->forumquote"; ?></div></td> </tr> </table><br> <p> <?php $forum_count = 15; function index_navigation($index, $count, $num) { $forum = $_GET['forum']; $viewtopic = $_GET['viewtopic']; if ($index != 0) { print "<a class='linktext' href=\"right.php?forum=$forum&viewtopic=$viewtopic&forum_look=" . ($index - $count) . "\">Previous</a> "; } if ($num == $count) { print " <a class='linktext' href=\"right.php?forum=$forum&viewtopic=$viewtopic&forum_look=" . ($index + $count) . "\">Next</a>"; } } if (! isset($forum_look) ) { $forum_look = 0; } if ($crew == "1"){ $query="SELECT * FROM replys WHERE idto = '$viewtopic' AND forum='$forum' AND crew='$fetch->crew' ORDER by `id` DESC LIMIT $forum_look, $forum_count"; }else{ $query="SELECT * FROM replys WHERE idto = '$viewtopic' AND forum='$forum' ORDER by `id` DESC LIMIT $forum_look, $forum_count"; } $query=mysql_query("$query"); $num=mysql_num_rows($query); while($right=mysql_fetch_object($query)){ if ($fetch->userlevel == "0"){ $forumquote = mysql_query("SELECT * FROM user_info WHERE username = '$right->username'"); $fq = mysql_fetch_object($forumquote); if($fq->gender == "Dont State") { $gender = "ds.PNG"; } if($fq->gender == "Male") { $gender = "male.gif"; } if($fq->gender == "Female") { $gender = "female.gif"; } if ($fq->posts >= "0" && $fq->posts < "80"){ $forumrank = "Forum Bum"; } if ($fq->posts >= "81" && $fq->posts < "160"){ $forumrank = "Curb Crawler"; } if ($fq->posts >= "161" && $fq->posts < "220"){ $forumrank = "Post Star"; } if ($fq->posts >= "221" && $fq->posts < "290"){ $forumrank = "V.I.Poster"; } if ($fq->posts >= "291"){ $forumrank = "Post Whore"; } if ($fq->posts >= "0" && $fq->posts < "80"){ $forumpic = "1.jpg"; } if ($fq->posts >= "81" && $fq->posts < "160"){ $forumpic = "2.jpg"; } if ($fq->posts >= "161" && $fq->posts < "220"){ $forumpic = "3.jpg"; } if ($fq->posts >= "221" && $fq->posts < "290"){ $forumpic = "4.jpg"; } if ($fq->posts >= "291"){ $forumpic = "5.jpg"; } echo "<table width=100% height=178 border=1 cellpadding=0 cellspacing=0 bordercolor=#000000 class=\"background\"> <tr> <td height=21 colspan=2 class=\"header\"><div align=center><a href='profile.php?viewuser=$right->username' target=mainFrame>$right->username</a> <b>On:</b> $right->made</div></td> </tr> <tr> <td width='8%' rowspan='3' bgcolor=#777777> <center> <img src='$fq->forumpic' hight='65' width='65' align='center'> <span class=style2>$fq->posts Posts</span> <img src='$forumpic'> <span class=style2>$forumrank</span> <br><img src='$gender'> </td> </tr> <tr> <td width=92% height='134' class='topictext' bgcolor='#ffffff'>"; echo replace($right->text); echo "</td> </tr> <tr> <td height='21' colspan='1' bgcolor=#ffffff> <div align=center><font color=000000>$fq->forumquote</div></td> </tr> </table><br> <p>"; }elseif ($fetch->userlevel =! "0"){ $forumquote = mysql_query("SELECT * FROM user_info WHERE username = '$right->username'"); $fq = mysql_fetch_object($forumquote); if($fq->gender == "Dont State") { $gender = "ds.PNG"; } if($fq->gender == "Male") { $gender = "male.gif"; } if($fq->gender == "Female") { $gender = "female.gif"; } if ($fq->posts >= "0" && $fq->posts < "80"){ $forumrank = "Forum Bum"; } if ($fq->posts >= "81" && $fq->posts < "160"){ $forumrank = "Curb Crawler"; } if ($fq->posts >= "161" && $fq->posts < "220"){ $forumrank = "Post Star"; } if ($fq->posts >= "221" && $fq->posts < "290"){ $forumrank = "V.I.Poster"; } if ($fq->posts >= "291"){ $forumrank = "Post Whore"; } if ($fq->posts >= "0" && $fq->posts < "80"){ $forumpic = "1.jpg"; } if ($fq->posts >= "81" && $fq->posts < "160"){ $forumpic = "2.jpg"; } if ($fq->posts >= "161" && $fq->posts < "220"){ $forumpic = "3.jpg"; } if ($fq->posts >= "221" && $fq->posts < "290"){ $forumpic = "4.jpg"; } if ($fq->posts >= "291"){ $forumpic = "5.jpg"; } echo "<table width=100% height=178 border=1 cellpadding=0 cellspacing=0 bordercolor=#000000 class=\"background\"> <tr> <td height=21 colspan=2 class=\"header\"><div align=center><a href='right.php?clean=$right->id&forum=$forum&viewtopic=$viewtopic'><font color=red>Delete</font></a> <a href='profile.php?viewuser=$right->username' target=mainFrame>$right->username</a> <b>On:</b> $right->made</div></td> </tr> <tr> <td width='8%' rowspan='3' bgcolor=#777777> <center> <img src='$fq->forumpic' hight='65' width='65' align='center'> <span class=style2>$fq->posts Posts</span> <img src='$forumpic'> <span class=style2>$forumrank</span> <br><img src='$gender'> </td> </tr> <tr> <td width=92% height='134' class='topictext' bgcolor='#ffffff'>"; echo replace($right->text); echo "</td> </tr> <tr> <td height='21' colspan='1' bgcolor=#ffffff> <div align=center><font color=000000>$fq->forumquote</div></td> </tr> </table><br> <p>"; } } if($_GET[clean]) { $clean=$_GET[clean]; if($userlevel == '0'){ echo "Error."; exit; }else mysql_query("DELETE FROM replys WHERE id='$clean' AND forum='$forum'") or die ("Cannot delete reply"); echo "Reply Deleted"; echo "<SCRIPT LANGUAGE='JavaScript'> window.location='right.php?forum=$forum&viewtopic=$g'; </script>"; } ?> <?php index_navigation($forum_look, $forum_count, $num); ?> <br> <br> <? if (!$viewtopic){ $viewtopic = "1"; } if(strip_tags($_POST['Submit']) && strip_tags($_POST['reply_text']) && $forum && $viewtopic){ $reply_text = addslashes(strip_tags($_POST['reply_text'])); $topic_info=mysql_fetch_object(mysql_query("SELECT * FROM topics WHERE id='$viewtopic' AND forum='$forum'")); if ($topic_info->sticky == "1"){ $lastreplytime = $topic_info->lastreply; }elseif ($stikornot == "0"){ $lastreplytime = time(); } if ($topic_info->locked == "1"){ echo "This topic is locked."; exit(); } $date = gmdate('Y-m-d h:i:s'); if ($crew == "1" && $fetch->crew != "0"){ mysql_query("INSERT INTO `replys` (`id`, `username`, `text`, `forum`, `idto`,`made`,`crew`) VALUES ('', '$username', '$reply_text', '$forum', '$viewtopic','$date','$fetch->crew');") or die (mysql_error()); }else{ mysql_query("INSERT INTO `replys` (`id`, `username`, `text`, `forum`, `idto`,`made`) VALUES ('', '$username', '$reply_text', '$forum', '$viewtopic','$date');") or die (mysql_error()); here is what am wanting to submit in to the table look down the code you'll see the textarea } mysql_query("UPDATE `user_info` SET `posts` = `posts`+1 WHERE username='$username'"); mysql_query("UPDATE topics SET lastreply='$lastreplytime' WHERE id='$viewtopic' AND sticky='0'"); mysql_query("UPDATE `user_info` SET `posts` = `posts`+1 WHERE username='$username'"); echo " <SCRIPT LANGUAGE='JavaScript'> window.location='right.php?forum=$forum&viewtopic=$viewtopic'; </script>"; } ?> <script language=JavaScript> function so(dis) { for (i=0;i<dis.elements.length;i++){ if (dis.elements.type=='submit') dis.elements.style.visibility='hidden'; } if(fs==false){ fs=true; return true; }else return false; } function goaway() { for(i=0;i<document.forms.length;i++) document.forms.onsubmit = function() {return so(this);}; } </script><body onload=goaway();> <form action='' method=post> <input name="forumto" type="hidden" value="<?php echo "$forum"; ?>"> <input name="this" type="hidden" id="this" value="<?php echo "$viewtopic"; ?>"> <center><a href="bbcode.php"><img src="../images/bbcodes.jpg" border="0"></a> <a href="color.php"><img src="../images/colours.jpg" border="0"></a></center> <table class=titletext border=0 cellspacing=0 cellpadding=2 width=100% bordercolor="black"> <tr> <td class="header"> Reply: </td> </tr> <tr> <td > <textarea name="reply_text" cols="" rows="5" class="topictext" id="reply_text" style="width: 90%;"></textarea> <br> </td> </tr> <tr> <td width=33% class=thinline><input name=Submit type=submit class="submit" value=Submit></td> here is they submit button submit the textarea named reply text </tr> </table> </form> <? } ?> <? mysql_close(); ?>
  7. or that could mean they is code before the session regiter only the <?php tag should be before it
  8. thegod

    Coding

    you should not be giving other sites out but search for this there is alot of scripts to help you
  9. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in tops.php on line 33 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in tops.php on line 56 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in tops.php on line 76 i have point the lines out in red this is tops coding <? session_start(); include "includes/functions.php"; logincheck(); $username=$_SESSION['username']; include "includes/db_connect.php"; echo "$style"; ?> <center><html><head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <table width="100%" border="0" cellspacing="4" cellpadding="2"> <tr> <td width="274" height="122" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="<?php echo "$td_border"; ?>" bgcolor="#666666"> <tr> <td height="22" colspan="2" background="includes/grad.jpg"><center class="TableHeading"> <font color="#FFFFFF">Top 10 Ranks </center></td> </tr> <tr> <td width="127" height="10" valign="top"><b>Username</b></td> <td width="136" valign="top"><b>Rank</b></td> </tr> <center><?php $tsel = mysql_query("select * from `users` where `userlevel`='0' and `status`='alive' order by `rank` desc limit 10"); while ($top=mysql_fetch_array($tsel)) { line 36 print "<tr><td></center><a href=profile.php?viewuser=$top[username]>$top[username]</a></td><td align=right>$top[rank]</td></tr>"; } ?> </table> <br> <br> <table width="100%" border="0" cellspacing="2" cellpadding="0" align="center"> <tr> <td width="200%" height="122" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="<?php echo "$td_border"; ?>" bgcolor="#666666"> <tr> <td height="22" colspan="2" background="includes/grad.jpg"><center class="TableHeading"> <font color="#FFFFFF">10 Richest Players </center></td> </tr> <tr> <td width="127" height="10" valign="top"><b>Username</b></td> <td width="136" valign="top"><b>Rank</b></td> </tr> <?php $tsel = mysql_query("select * from `users` where `userlevel`='0' and `status`='alive' order by `money` desc limit 10"); while ($top = mysql_fetch_array($tsel)) { Line 56 print "<tr><td><a href=profile.php?viewuser=$top[username]>$top[username]</a></td><td align=right>$top[rank]</td></</tr>"; } ?> </table> <table width="100%" border="0" cellspacing="4" cellpadding="2"> <tr> <td width="274" height="122" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="<?php echo "$td_border"; ?>" bgcolor="#666666"> <tr> <td height="22" colspan="2" background="includes/grad.jpg"><center class="TableHeading"> <font color="#FFFFFF">Top 10 Forum Posters </center></td> </tr> <tr> <td width="127" height="10" valign="top"><b>Username</b></td> <td width="136" valign="top"><b>Posts</b></td> </tr> <center><?php $tsel = mysql_query("select * from `users` where `userlevel`='0' and `status`='alive' order by `posts` desc limit 10"); while ($top = mysql_fetch_array($tsel)) { line 76 print "<tr><td></center><a href=profile.php?viewuser=$top[username]>$top[username]</a></td><td align=right>$top[posts]</td></tr>"; } ?> </table> <br> <br> </td> </table> </body> </html></center>
  10. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in tops.php on line 33 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in tops.php on line 56 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in tops.php on line 76 i have point the lines out in red this is tops coding <? session_start(); include "includes/functions.php"; logincheck(); $username=$_SESSION['username']; include "includes/db_connect.php"; echo "$style"; ?> <center><html><head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <table width="100%" border="0" cellspacing="4" cellpadding="2"> <tr> <td width="274" height="122" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="<?php echo "$td_border"; ?>" bgcolor="#666666"> <tr> <td height="22" colspan="2" background="includes/grad.jpg"><center class="TableHeading"> <font color="#FFFFFF">Top 10 Ranks </center></td> </tr> <tr> <td width="127" height="10" valign="top"><b>Username</b></td> <td width="136" valign="top"><b>Rank</b></td> </tr> <center><?php $tsel = mysql_query("select * from `users` where `userlevel`='0' and `status`='alive' order by `rank` desc limit 10"); while ($top=mysql_fetch_array($tsel)) { line 36 print "<tr><td></center><a href=profile.php?viewuser=$top[username]>$top[username]</a></td><td align=right>$top[rank]</td></tr>"; } ?> </table> <br> <br> <table width="100%" border="0" cellspacing="2" cellpadding="0" align="center"> <tr> <td width="200%" height="122" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="<?php echo "$td_border"; ?>" bgcolor="#666666"> <tr> <td height="22" colspan="2" background="includes/grad.jpg"><center class="TableHeading"> <font color="#FFFFFF">10 Richest Players </center></td> </tr> <tr> <td width="127" height="10" valign="top"><b>Username</b></td> <td width="136" valign="top"><b>Rank</b></td> </tr> <?php $tsel = mysql_query("select * from `users` where `userlevel`='0' and `status`='alive' order by `money` desc limit 10"); while ($top = mysql_fetch_array($tsel)) { Line 56 print "<tr><td><a href=profile.php?viewuser=$top[username]>$top[username]</a></td><td align=right>$top[rank]</td></</tr>"; } ?> </table> <table width="100%" border="0" cellspacing="4" cellpadding="2"> <tr> <td width="274" height="122" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="<?php echo "$td_border"; ?>" bgcolor="#666666"> <tr> <td height="22" colspan="2" background="includes/grad.jpg"><center class="TableHeading"> <font color="#FFFFFF">Top 10 Forum Posters </center></td> </tr> <tr> <td width="127" height="10" valign="top"><b>Username</b></td> <td width="136" valign="top"><b>Posts</b></td> </tr> <center><?php $tsel = mysql_query("select * from `users` where `userlevel`='0' and `status`='alive' order by `posts` desc limit 10"); while ($top = mysql_fetch_array($tsel)) { line 76 print "<tr><td></center><a href=profile.php?viewuser=$top[username]>$top[username]</a></td><td align=right>$top[posts]</td></tr>"; } ?> </table> <br> <br> </td> </table> </body> </html></center>
  11. thegod

    getting

    is they a way of people getting my webscripts?
  12. that is the function coding and i have marked line 68
  13. try get the query from your database programme ussally make it for you
  14. ??? including a if statement would that work? please show me how to put that line of coding many thanks
  15. Try changes the Cap locks words
  16. Fatal error: Cannot redeclare logincheck() (previously declared in functions.php:68) in functions.php on line 65 here is the code <?php session_start(); include_once "includes/db_connect.php"; $username=$_SESSION['username']; echo "<link rel=stylesheet href=includes/in.css type=text/css>"; $query=mysql_query("SELECT * FROM user_info WHERE username='$username' LIMIT 1"); $info = mysql_fetch_object($query); $don=mysql_num_rows(mysql_query("SELECT * FROM donaters WHERE username='$username'")); $date = gmdate('Y-m-d h:i:s'); if ($info->health <= "0"){ mysql_query("UPDATE user_info SET status='Dead' WHERE username='$username'"); session_destroy(); } if ($info->status == "Dead" || $info->status == "Banned"){ session_destroy(); echo "Your DEAD!!!!!"; exit(); } $crew_check =mysql_query("SELECT * FROM crews"); while($k = mysql_fetch_object($crew_check)){ $user=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$k->owner'")); $rhm=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$k->rhm'")); if ($user->status == "Dead" || $user->status == "Banned"){ if ($k->rhm != "0" && $rhm->status == "Alive"){ mysql_query("UPDATE crews SET owner='$k->rhm', rhm='0' WHERE name='$k->name'"); } elseif ($k->rhm == "0" || $rhm->status == "Dead" || $rhm->status == "Banned"){ mysql_query("UPDATE `user_info` SET `crew`='0' WHERE `crew`='$k->name'"); mysql_query("DELETE FROM crews WHERE name='$k->name'"); } } } $bba=mysql_query("SELECT * FROM bank"); while($nana =mysql_fetch_object($bba)){ $ppl=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$nana->owner'")); if ($ppl->status == "Dead" || $ppl->status == "Banned"){ mysql_query("UPDATE bank SET owner='0' WHERE id='$nana->id'"); } } $oc_query=mysql_query("SELECT * FROM oc"); while($ttfn = mysql_fetch_object($oc_query)){ $user_oc=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$ttfn->leader'")); if ($user_oc->status == "Dead" || $user_oc->status == "Banned"){ mysql_query("UPDATE user_info SET oc='0' WHERE username='$ttfn->we'"); mysql_query("UPDATE user_info SET oc='0' WHERE username='$ttfn->ee'"); mysql_query("UPDATE user_info SET oc='0' WHERE username='$ttfn->driver'"); mysql_query("UPDATE user_info SET oc='0' WHERE username='$ttfn->leader'"); mysql_query("DELETE FROM oc WHERE id='$ttfn->id'"); }} function logincheck(){ if (empty($_SESSION['username'])){ [b][color=red][font=Verdana]Line 68[/font][/color][/b] echo " <SCRIPT LANGUAGE='JavaScript'> window.location='index.php'; </script> "; exit(); }} ////UPDATE ONLINE $time = time() + (60 * 10); mysql_query("UPDATE user_info SET online='$time' WHERE username='$username'"); ///FINSH UPDATING ONLINE function makecomma($input) { if(strlen($input)<=3) { return $input; } $length=substr($input,0,strlen($input)-3); $formatted_input = makecomma($length).",".substr($input,-3); return $formatted_input; } /////////NOW TO THE BB CODES ETC.... function rankcheck(){ $username=$_SESSION['username']; $query=mysql_query("SELECT * FROM user_info WHERE username='$username' LIMIT 1"); $info = mysql_fetch_object($query); $date = gmdate('Y-m-d h:i:s'); if (($info->rank == "Bitch") && ($info->rankpoints >= "100")){ $newrank="chavers sister"; $done="1"; } elseif (($info->rank == "chavers sister") && ($info->rankpoints >= "200")){ $newrank="chav"; $done="1"; } elseif (($info->rank == "chav") && ($info->rankpoints >= "300")){ $newrank="Thug"; $done="1"; } elseif (($info->rank == "Thug") && ($info->rankpoints >= "600")){ $newrank="joey"; $done="1"; } elseif (($info->rank == "joey") && ($info->rankpoints >= "1600")){ $newrank="Soild Gangster"; $done="1"; } elseif (($info->rank == "Soild Gangster") && ($info->rankpoints >= "32000")){ $newrank="Soild Boss"; $done="1"; } elseif (($info->rank == "Soild Boss") && ($info->rankpoints >= "64000")){ $newrank="Golbal Scare"; $done="1"; } elseif (($info->rank == "Golbal Scare") && ($info->rankpoints >= "128000")){ $newrank="Goodfella"; $done="1"; } elseif (($info->rank == "Goodfella") && ($info->rankpoints >= "256000")){ $newrank="Respectable Goodfella"; $done="1"; } elseif (($info->rank == "Respectable Goodfella") && ($info->rankpoints >= "512000")){ $newrank="Respectable Godfather"; $done="1"; } elseif (($info->rank == "Respectable Godfather") && ($info->rankpoints >= "1024000")){ $newrank="Offical GH Godfather Legend"; $done="1"; } elseif (($info->rank == "Offical GH Godfather Legend") && ($info->rankpoints >= "100000000000")){ $newrank="GOD OF GH"; $done="1"; } if (!$done){ $done="0"; } if ($done == "1"){ mysql_query("UPDATE user_info SET rank='$newrank' WHERE username='$username'"); mysql_query("INSERT INTO `inbox` ( `id` , `to` , `from` , `message` , `date` , `read` , `saved` , `event_id` ) VALUES ( '', '$username', '$username', 'You have been promoted to $newrank your doing well!', '$date', '0', '0', '0' )"); }} rankcheck(); ///////HOUSTON WE HAVE JAIL CHECK! $jail_check=mysql_query("SELECT * FROM jail"); while($monster=mysql_fetch_object($jail_check)){ if (time() > $monster->time_left){ mysql_query("DELETE FROM jail WHERE username='$monster->username'"); }} function maketime($last){ $timenow = time(); if($last>$timenow){ $order = $last-$timenow; while($order >= 60){ $order = $order-60; $ordermleft++; } while($ordermleft >= 60){ $ordermleft = $ordermleft-60; $orderhleft++; } if($ordermleft == 0){ $ordermleft = ""; } else { $ordermleft = "$ordermleft Minutes"; } if($orderhleft == 0){ $orderhleft = ""; } else { $orderhleft = "$orderhleft Hours"; } return "$orderhleft $ordermleft $order Seconds"; }} function loose_energy(){ $username=$_SESSION['username']; $query=mysql_query("SELECT * FROM user_info WHERE username='$username' LIMIT 1"); $info = mysql_fetch_object($query); $energy=$info->energy - rand(1,3); if ($energy <= "0"){ $update=health; $thing=$info->health - rand(1,3); $energy_new="0"; }elseif ($energy > "0"){ $update=energy; $thing=$info->energy - rand(1,3); } if (!$energy_new){ mysql_query("UPDATE user_info SET $update='$thing' WHERE username='$username'"); }elseif ($energy_new){ mysql_query("UPDATE user_info SET $update='$thing', energy='0' WHERE username='$username'"); } } $most_online=mysql_fetch_object(mysql_query("SELECT * FROM site_stats WHERE id='1'")); $timenow=time(); $now_online =mysql_num_rows(mysql_query("SELECT * FROM user_info WHERE online > '$timenow'")); if ($now_online > $most_online->online){ mysql_query("UPDATE site_stats SET online='$now_online' WHERE id='1'"); } $drop =mysql_query("SELECT * FROM casinos"); while($tard=mysql_fetch_object($drop)){ $per = mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$tard->owner'")); if ($per->status == "Dead" || $per->status == "Banned"){ mysql_query("UPDATE casinos SET owner='0' WHERE casino='$tard->casino' AND owner='$tard->owner'"); } } $drop_bar =mysql_query("SELECT * FROM bar"); $tard_bar= mysql_query("SELECT * FROM bar"); $per_bar = mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$tard_bar->owner'")); if ($per_bar->status == "Dead" || $per_bar->status == "Banned"){ mysql_query("UPDATE bar SET owner='0' WHERE owner='$tard_bar->owner'"); } $drop_bf =mysql_query("SELECT * FROM bf"); while($tard_bf=mysql_fetch_object($drop_bf)){ $per_bf = mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$tard_bf->owner'")); if ($per_bf->status == "Dead" || $per_bf->status == "Banned"){ mysql_query("UPDATE bf SET owner='0' WHERE owner='$tard_bf->owner'"); } } if ($info->banktime <= time() && $info->bank > "0"){ $nmoney = 10 * $info->bank / 100; $money_in = $info->bank + $nmoney; $money_in= round($money_in); $recieve = $info->money + $money_in; mysql_query("UPDATE user_info SET money = '$recieve', bank='0', banktime='0' WHERE username='$username'"); } $drop_und =mysql_query("SELECT * FROM shop"); while($tard_und=mysql_fetch_object($drop_und)){ $per_und = mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$tard_und->owner'")); if ($per_und->status == "Dead" || $per_und->status == "Banned"){ mysql_query("UPDATE shop SET owner='0' WHERE owner='$tard_und->owner'"); } } $user_info=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$username'")); if ($user_info->jail_able == "1" && $user_info->jail_untill <= time()){ mysql_query("UPDATE user_info SET jail_able='0' WHERE username='$username'"); } $user_shit=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$username'")); if ($user_shit->last_respect < time() && $fetch->rank != "Bitch"){ if ($info->rank == "chavers sister"){ $new_res="1"; }elseif($info->rank == "chav"){ $new_res="2"; }elseif($info->rank == "Thug"){ $new_res="3"; }elseif($info->rank == "joey"){ $new_res="4"; }elseif($info->rank == "Soild Gangster"){ $new_res="5"; }elseif($info->rank == "Soild Boss"){ $new_res="6"; }elseif($info->rank == "Golbal Scare"){ $new_res="7"; }elseif($info->rank == "Goodfella"){ $new_res="8"; }elseif($info->rank == "Respectable Goodfella"){ $new_res="9"; }elseif($info->rank == "Respectable Godfather"){ $new_res="10"; }elseif($info->rank == "Offical GH Godfather Legend"){ $new_res="11"; }elseif($info->rank == "Offical GH Godfather Legend"){ $new_res="12"; } $now=time() + (3600 * 24 * 7); mysql_query("UPDATE user_info SET respect='$new_res', last_respect='$now' WHERE username='$username'"); } ?>
  17. also only put <?php before session start() no other coding or gives an error
  18. Parse error: parse error, unexpected T_VARIABLE, expecting '(' in /functions.php on line 231 $drop_bar =mysql_query("SELECT * FROM bar"); $tard_bar= mysql_query("SELECT * FROM bar");{ line 231 $per_bar = mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$tard_bar->owner'")); thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.