Jump to content

Fatal error: Cannot redeclare makecomma()


justoneguy

Recommended Posts

Fatal error: Cannot redeclare makecomma() (previously declared in includes/functions.php:83) in functions.php on line 70

 

here the code it happens in

 

<?php
session_start();
include_once "includes/db_connect.php";
include_once "includes/functions.php";
include_once"probe.php";
logincheck();
$page="crime.php";




$username=$_SESSION['username'];
$radiobutton=$_POST['radiobutton'];
$above = mysql_query("SELECT * FROM user_info WHERE username='$username'");
$info = mysql_fetch_object($above);
$chance = explode("-", $info->crimechance);


if ($info->lastcrime > time()){
$left = $info->lastcrime - time();
echo "<p class='warning'>Slow down you wil break your mouse, you have done a crime latley,you have to wait for $left seconds!</p>";
exit();
}



if ($_POST['submit']){

$suc = $chance[$radiobutton];
$ran = rand(1,100);


if ($ran <= $suc){


if ($radiobutton == "0"){
  $win = rand(100,200);
  $success = $chance[0];
  $quote="<p class='success'>The shopkeeper hands over the till.</p>";
}elseif ($radiobutton == "1"){
  $win = rand(20,40);
  $success = $chance[1];
  $quote="<p class='success'>The child hands over his cash.</p>";
  
}elseif ($radiobutton == "2"){
  $win = rand(500,1000);
  $success = $chance[2];
  $quote="<p class='success'>You stole your farthers wallet with out him knowing.</p>";
}elseif ($radiobutton == "3"){
  $win = rand(1000,2000);
  $success = $chance[3];
  $quote="<p class='success'>Good work, you steel you neighbors money.</p>";
}elseif ($radiobutton == "4"){
  $win = rand(2000,4000);
  $success = $chance[4];
  $quote="<p class='success'>The bank clerk hands over the cash.</p>";
}elseif ($radiobutton == "5"){
  $win = rand(4000,10000);
  $success = $chance[5];
  $quote="<p class='success'>Well done, you walked out with the piggy bank.</p>";
}elseif ($radiobutton == "6"){
  $win = rand(9000,10000);
  $success = $chance[5];
  $quote="You kill the driver and steal his car.";
$item_rand = rand(1,100);
}
$new_item = array('Weed seeds','Bandanna','Black boots','Bling','Chain','Yellow Pages','Tracking Device','Cheese Burger','Fries','Chicken Nuggets','Crisps','Curry','Fish');
$rand_item = rand(0,12);
$item_get=$new_item[$rand_item];
if ($item_rand >= "90"){

if ($item_get == "Weed seeds"){
$value="4000";
}elseif ($item_get == "Bandanna"){
$value="500";
}elseif ($item_get == "Black boots"){
$value="300";
}elseif ($item_get == "Bling"){
$value="3000";
}elseif ($item_get == "Chain"){
$value="3000";
}elseif ($item_get == "Yellow Pages"){
$value="10000";
}elseif ($item_get == "Tracking Device"){
$value="20000";
}elseif ($item_get == "Cheese Burger"){
$value="200";
}elseif ($item_get == "Fries"){
$value="110";
}elseif ($item_get == "Chicken Nuggets"){
$value="180";
}elseif ($item_get == "Crisps"){
$value="100";
}elseif ($item_get == "Curry"){
$value="500";
}elseif ($item_get == "Fish"){
$value="250";
}




echo "Congratulations, you smashed open the safe and you got away with $item_get";
mysql_query("INSERT INTO `items` ( `id` , `item` , `value`,`owner` ) 
VALUES (
'', '$item_get', '$value','$username'
)");

}else{
echo "$quote Congratulations ! you got away with £$win!!";
rankcheck();
$time= time() + 120;
$newrank=rand(1,10);

loose_energy();

$n_money=$info->money+$win;

$new_rank=$info->rankpoints + rand(2,10);
mysql_query("UPDATE user_info SET money='$n_money', rankpoints='$new_rank' WHERE username='$username'");
mysql_query("UPDATE user_info SET crimes=crimes+1 WHERE username='$username'");
}



  }else{
  if ($radiobutton == "0"){
  $quote="<p class='warning'>The shopkeeper rings the police.</p>";
}elseif ($radiobutton == "1"){
$quote="<p class='warning'>The child kicks you in your priverts, you run away crying.</p>";
}elseif ($radiobutton == "2"){

  $quote="<p class='warning'>Your farther kicks you out of the house bad luck.</p>";
}elseif ($radiobutton == "3"){

  $quote="<p class='warning'>The old man hits you with his walking stick.</p>";
}elseif ($radiobutton == "4"){

  $quote="<p class='warning'>The police run in and catch you.</p>";
}elseif ($radiobutton == "5"){

  $quote="<p class='warning'>Your brother tosses the piggy bank off your head.</p>";
}elseif ($radiobutton == "6"){
  
$quote="The driver over powers you bad work.";
}
rankcheck();


loose_energy();

echo "$quote ";
$new_rank = $info->rankpoints + rand(1,5);
mysql_query("UPDATE user_info SET rankpoints='$new_rank' WHERE username='$username'");
mysql_query("UPDATE user_info SET crimes=crimes+1 WHERE username='$username'"); 
$reason = "Crime";
require_once"includes/failed.php";
}

if($chance[0] == 1){$chance[1] = 1;}
elseif(($chance[0] >= 1) && ($chance[0] <= 2)){$chance[0] = rand(1,$chance[0]);}
elseif(($chance[0] >= 2) && ($chance[0] <= 10)){$chance[0] = rand(10,$chance[0]);}
elseif(($chance[0] >= 5) && ($chance[0] <= 25)){$chance[0] = rand(25,$chance[0]);}
elseif(($chance[0] >= 18) && ($chance[0] <= 36)){$chance[0] = rand(36,$chance[0]);}
elseif(($chance[0] >= 25) && ($chance[0] <= 49)){$chance[0] = rand(49,$chance[0]);}
        elseif(($chance[0] >= 36) && ($chance[0] <= 58)){$chance[0] = rand(58,$chance[0]);}
        elseif(($chance[0] >= 49) && ($chance[0] <= 55)){$chance[0] = rand(55,$chance[0]);}
elseif($chance[0] >= 55){$chance[0] = rand(55,$chance[0]);}


if($chance[0] == 1){$chance[1] = 0;}
elseif(($chance[0] >= 1) && ($chance[0] <= 2)){$chance[1] = rand(0,$chance[0]);}
elseif(($chance[0] >= 3) && ($chance[0] <= ){$chance[1] = rand(7,$chance[0]);}
elseif(($chance[0] >= 9) && ($chance[0] <= 15)){$chance[1] = rand(14,$chance[0]);}
elseif(($chance[0] >= 16) && ($chance[0] <= 34)){$chance[1] = rand(33,$chance[0]);}
elseif(($chance[0] >= 35) && ($chance[0] <= 74)){$chance[1] = rand(45,$chance[0]);}
elseif($chance[0] >= 75){$chance[1] = rand(50,$chance[0]);}

if($chance[0] == 1){$chance[2] = 0;}
elseif(($chance[0] >= 1) && ($chance[0] <= 2)){$chance[2] = rand(0,$chance[0]);}
elseif(($chance[0] >= 3) && ($chance[0] <= ){$chance[2] = rand(6,$chance[0]);}
elseif(($chance[0] >= 9) && ($chance[0] <= 15)){$chance[2] = rand(13,$chance[0]);}
elseif(($chance[0] >= 16) && ($chance[0] <= 34)){$chance[2] = rand(32,$chance[0]);}
elseif(($chance[0] >= 35) && ($chance[0] <= 74)){$chance[2] = rand(60,$chance[0]);}
elseif($chance[0] >= 75){$chance[2] = rand(85,$chance[0]);}

if($chance[0] == 1){$chance[3] = 0;}
elseif(($chance[0] >= 1) && ($chance[0] <= 2)){$chance[3] = rand(0,$chance[0]);}
elseif(($chance[0] >= 3) && ($chance[0] <= 9)){$chance[3] = rand(7,$chance[0]);}
elseif(($chance[0] >= 10) && ($chance[0] <= 17)){$chance[3] = rand(14,$chance[0]);}
elseif(($chance[0] >= 18) && ($chance[0] <= 37)){$chance[3] = rand(35,$chance[0]);}
elseif(($chance[0] >= 38) && ($chance[0] <= 76)){$chance[3] = rand(60,$chance[0]);}
elseif($chance[0] >= 77){$chance[3] = rand(70,$chance[0]);}
//echo
if($chance[0] == 1){$chance[4] = 0;}
elseif(($chance[0] >= 1) && ($chance[0] <= 3)){$chance[4] = rand(0,$chance[0]);}
elseif(($chance[0] >= 4) && ($chance[0] <= 11)){$chance[4] = rand(9,$chance[0]);}
elseif(($chance[0] >= 12) && ($chance[0] <= 19)){$chance[4] = rand(16,$chance[0])-14;}
elseif(($chance[0] >= 20) && ($chance[0] <= 39)){$chance[4] = rand(28,$chance[0])-14;}
elseif(($chance[0] >= 40) && ($chance[0] <= 79)){$chance[4] = rand(69,$chance[0])-14;}
elseif($chance[0] >= 80){$chance[4] = rand(75,$chance[0])-14;}


//echo
if($chance[0] == 1){$chance[5] = 0;}
elseif(($chance[0] >= 1) && ($chance[0] <= 3)){$chance[5] = rand(0,$chance[0]);}
elseif(($chance[0] >= 4) && ($chance[0] <= 11)){$chance[5] = rand(9,$chance[0]);}
elseif(($chance[0] >= 12) && ($chance[0] <= 19)){$chance[5] = rand(16,$chance[0])-14;}
elseif(($chance[0] >= 20) && ($chance[0] <= 39)){$chance[5] = rand(28,$chance[0])-14;}
elseif(($chance[0] >= 40) && ($chance[0] <= 79)){$chance[5] = rand(69,$chance[0])-14;}
elseif($chance[0] >= 80){$chance[5] = rand(75,$chance[0])-14;}


if($chance[0] > 100){
	$chance[0] = 100;
}	
if($chance[1] > 100){
	$chance[1] = 100;
}	
if($chance[2] > 100){
	$chance[2] = 100;
}	
if($chance[3] > 100){
	$chance[3] = 100;
}
if($chance[4] > 100){
	$chance[4] = 100;
}	
if($chance[5] > 100){
	$chance[5] = 100;
}	



$chance[0]++;
if ($chance[0] > 110){
	$chance[0] = 110;
}

$arrayrates = array($chance[0], $chance[1], $chance[2], $chance[3], $chance[4], $chance[5]);
$newrates = implode("-", $arrayrates);
$tim = time() + rand(60,200);
mysql_query("UPDATE user_info SET crimechance='$newrates',lastcrime='$tim' WHERE username='$username'");
	exit;



}

?>






<link rel=stylesheet href=images/in.css type=text/css><style>


body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
}
bold {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
        font-weight: bold
	}
body  { 
color:#000000;
font-family: arial;
background-image: url(http://www.thelegendarymafia.net/images/black1.jpg);
    background-repeat: repeat;
scrollbar-face-color: #666666; 
scrollbar-shadow-color: #666666; 
scrollbar-highlight-color: #000000; 
scrollbar-3dlight-color: #999999; 
scrollbar-darkshadow-color: #999999; 
scrollbar-track-color: #999999; 
scrollbar-arrow-color: #999999; 
font-size: 10px; }


td.header  { 
  font-size: 15px;  
  font-family: Verdana, Arial, Helvetica, sans-serif;
  color: #000000;
  background-image: url(http://www.thelegendarymafia.net/includes/grad.jpg);
}
td.tip  {  
  font-size: 10px;  
font-family: arial;
  color: #000000;
}

.tableHeading
{
font-size: 15px;  
  font-family: Verdana, Arial, Helvetica, sans-serif;
  color: #000000;
  background-image: url(includes/grad.jpg);
}


a{text-decoration:none; color:black; font-size: 10px;}
a:link{text-decoration:none; color:black; font-size: 10px;}
a:visited{text-decoration:none; color:black; font-size: 10px;}
a:hover{text-decoration:underline; color:black; font-size: 10px;}
a:active{text-decoration:none color:black; font-size: 10px;}
input.submit{
font-size: 10px;
color: #000000;
background-color: #252525;
border-style: solid;
border-color: #ffffff;
border-width: 1px;
}
table.thinline {
   border-collapse:collapse;
   border:1px solid #000000;
   align:center;
   margin-left:auto;
   margin-right:auto;
   background-color: #CCCCCC;
   font-size: 10px;
}
.style4 {font-family: Verdana, Arial, Helvetica, sans-serif}
</style>








<html><head>


<title>Untitled Document</title>


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">




<style type="text/css">
<!--
.style3 {
font-size: 18px;
color: #FFFFFF;
}
.style6 {font-size: 12}
.style7 {font-size: 12px}
-->
</style>
</head>


<center> <body> 


<form name="form1" method="post" action="">


  <table width="53%" height="127" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor=black class=thinline>
    <!--DWLayoutTable-->
    <tr> 
      <td colspan="3" background="includes/grad.jpg"><center>
          <strong>Crimes</strong> </center></td>
    </tr>


<tr>
<td colspan="2">
<img src="images/crime.gif" border="0">
</td>
</tr>

    <tr> 
      <td width="67%" height="9" valign="top"  background="http://i1.tinypic.com/21opx91.jpg"> <input type="radio" name="radiobutton" value="0" onClick="this.document.img.src='images/crimes/phone_boy.jpg'">
        <font color="black"><b>Rob The Corner Shop</td>
      <td width="33%" valign="top" background="http://i1.tinypic.com/21opx91.jpg"><font color="black"><b><?php echo "$chance[0]"; ?> <b>%</td>
    </tr>
    <tr> 
      <td height="17" valign="top" background="http://i1.tinypic.com/21opx91.jpg"><input type="radio" name="radiobutton" value="1" onClick="this.document.img.src='images/crimes/coffee.jpg'">
        <font color="black"><b>Rob A Child</td>
      <td width="33%" valign="top" background="http://i1.tinypic.com/21opx91.jpg"><font color="black"><b><?php echo "$chance[1]"; ?><b>%</td>
    </tr>
    <tr> 
      <td height="4" valign="top"  background="http://i1.tinypic.com/21opx91.jpg"> <input type="radio" name="radiobutton" value="2" onClick="this.document.img.src='images/crimes/old_lady.jpg'">
        <font color="black"><b>Rob Your Farthers Wallet</td>
      <td width="33%" valign="top" background="http://i1.tinypic.com/21opx91.jpg"><font color="black"><b><?php echo "$chance[2]"; ?><b>%</td>
    </tr>
    <tr> 
      <td height="4" valign="top"  background="http://i1.tinypic.com/21opx91.jpg"> <input type="radio" name="radiobutton" value="3" onClick="this.document.img.src='images/crimes/tesco.jpg'">
        <font color="black"><b>Rob Your Neighbors House</td>
      <td width="33%" valign="top" background="http://i1.tinypic.com/21opx91.jpg"><font color="black"><b><?php echo "$chance[3]"; ?><b>%</td>
    </tr>
    <tr> 
      <td height="4" valign="top"  background="http://i1.tinypic.com/21opx91.jpg"><input type="radio" name="radiobutton" value="4" onClick="this.document.img.src='images/crimes/ass.jpg'">
        <font color="black"><b>Hold Up A Local Bank</td>
      <td width="33%" valign="top" background="http://i1.tinypic.com/21opx91.jpg"><font color="black"><b><?php echo "$chance[4]"; ?><b>%</td>
    </tr>
    <tr> 
      <td height="4" valign="top"  background="http://i1.tinypic.com/21opx91.jpg"> <input type="radio" name="radiobutton" value="5" onClick="this.document.img.src='images/crimes/bank_vault.jpg'">
        <font color="black"><b>Rob Your Brothers Piggy Bank</td>
      <td width="33%" valign="top" background="http://i1.tinypic.com/21opx91.jpg"><font color="black"><b><?php echo "$chance[5]"; ?><b>%</td>
    </tr>
       
<tr> 

   <td width="33%" valign="top" background="http://i1.tinypic.com/21opx91.jpg" colspan="2"> <center><input name="submit" type="submit" id="submit" value="Commit A Crime"> 
      </td>
    </tr>
  </table>

</form>


</html>







 

 

 

here is the code it says in

 

<?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'])){
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'"); 





}







?>

help please

Link to comment
https://forums.phpfreaks.com/topic/53874-fatal-error-cannot-redeclare-makecomma/
Share on other sites

nope... makecomma() function is defined in the body of that page...

 

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;
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.