Jump to content
MakeWebGames

Game Rank


Homicidal

Recommended Posts

I have tried putting this everywhere and I stil get errors;

Rank: ".get_gamerank($r['level'],$r['hPRICE'],$r)."

 

<?php

/*-----------------------------------------------------

-- Mono Country v1.0 BETA

-- A product of DBS-entertainment

-- Copyright held 2005 by Dabomstew

-- INDEX.php

-----------------------------------------------------*/

session_start();

require "global_func.php";

if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }

$userid=$_SESSION['userid'];

require "header.php";

$h = new headers;

$h->startheaders();

include "mysql.php";

global $c;

$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());

$ir=mysql_fetch_array($is);

check_level();

$fm=money_formatter($ir['money']);

$cm=money_formatter($ir['crystals'],'');

$lv=date('F j, Y, g:i a',$ir['laston']);

$h->userdata($ir,$lv,$fm,$cm);

$h->menuarea();

$_GET['u'] = abs((int) $_GET['u']);

if(!$_GET['u'])

{

print "Invalid use of file";

}

else

{

$q=mysql_query("SELECT u.*,us.*,c.*,h.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid={$_GET['u']}",$c);

if(mysql_num_rows($q) == 0)

{

print "Sorry, we could not find a user with that ID, check your source.";

}

else

{

$r=mysql_fetch_array($q);

if($r['user_level'] == 1) { $userl="Member"; } else if($r['user_level'] == 2) { $userl="Admin"; } else if ($r['user_level'] == 3) { $userl="Secretary"; } else if($r['user_level'] == 0) { $userl="NPC"; } else if($r['user_level']==4) { $userl="IRC Mod"; } else {$userl="Assistant"; }

$lon=date('F j, Y g:i:s a',$r['laston']);

$sup=date('F j, Y g:i:s a',$r['signedup']);

$ts=$r['strength']+$r['agility']+$r['guard']+$r['labour']+$r['IQ'];

$d="";

$la=time()-$r['laston'];

$unit="seconds";

if($la >= 60)

{

$la=(int) ($la/60);

$unit="minutes";

}

if($la >= 60)

{

$la=(int) ($la/60);

$unit="hours";

if($la >= 24)

{

$la=(int) ($la/24);

$unit="days";

}

}

if($r['donatordays']) { $r['username'] = "{$r['username']}";$d="donator.gif"; }

if($r['laston'] >= time()-15*60) { $on="Online"; } else { $on="Offline"; }

print "

Profile for {$r['username']}

General Info Financial Info Display Pic
Name: {$r['username']} [{$r['userid']}] $d

User Level: $userl

Duties: {$r['duties']}

Gender: {$r['gender']}

Signed Up: $sup

Last Active: $lon

Last Action: $la $unit ago

Online: $on

Days Old: {$r['daysold']}

Location: {$r['cityname']}

Money: \${$r['money']}

Crystals: {$r['crystals']}

Property: {$r['hNAME']}

Referals: ";

$rr=mysql_query("SELECT * FROM referals WHERE refREFER={$r['userid']}",$c);

print mysql_num_rows($rr);

$q_y=mysql_query("SELECT * FROM friendslist WHERE fl_ADDED={$r['userid']}",$c);

$q_z=mysql_query("SELECT * FROM blacklist WHERE bl_ADDED={$r['userid']}",$c);

print "

Friends: ".mysql_num_rows($q_y)."

Enemies: ".mysql_num_rows($q_z)."

";

if($r['display_pic'])

{

print "{$r[";

}

else

{

print "This user has no display pic!";

}

print "

Physical InfoLinksLevel: {$r['level']}

Health: {$r['hp']}/{$r['maxhp']}

Gang: ";

if($r['gang'])

{

print "{$r['gangNAME']}";

}

else

{

print "N/A";

}

if($r['fedjail'])

{

print "

In federal jail for {$r['fed_days']} day(s).

 

{$r['fed_reason']}";

}

if($r['hospital'])

{

print "

In hospital for {$r['hospital']} minutes.

{$r['hospreason']}";

}

if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5)

{

print "

IP Address: {$r['lastip']}";

print "

Staff Notes:

 

{$r['staffnotes']}

 

";

}

print "

[Send Mail]

 

 

[Send Cash]

 

 

[Attack]";

if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5)

{

print "

 

 

[Jail]

 

 

[Hack Users PC]

";

}

if($ir['donatordays'] > 0)

{

print "

 

 

[Add Friends]

 

 

[Add Enemies]

";

}

print "

";

}

}

$h->endpage();

?>

 

Here is the error I keep getting

 

Fatal error: Call to undefined function: get_gamerank() in /home/rob1978/public_html/darkside-mafia/viewuser.php on line 73

 

and here's how I have it placed

 

<?php

/*-----------------------------------------------------

-- Mono Country v1.0 BETA

-- A product of DBS-entertainment

-- Copyright held 2005 by Dabomstew

-- INDEX.php

-----------------------------------------------------*/

session_start();

require "global_func.php";

if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }

$userid=$_SESSION['userid'];

require "header.php";

$h = new headers;

$h->startheaders();

include "mysql.php";

global $c;

$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());

$ir=mysql_fetch_array($is);

check_level();

$fm=money_formatter($ir['money']);

$cm=money_formatter($ir['crystals'],'');

$lv=date('F j, Y, g:i a',$ir['laston']);

$h->userdata($ir,$lv,$fm,$cm);

$h->menuarea();

$_GET['u'] = abs((int) $_GET['u']);

if(!$_GET['u'])

{

print "Invalid use of file";

}

else

{

$q=mysql_query("SELECT u.*,us.*,c.*,h.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid={$_GET['u']}",$c);

if(mysql_num_rows($q) == 0)

{

print "Sorry, we could not find a user with that ID, check your source.";

}

else

{

$r=mysql_fetch_array($q);

if($r['user_level'] == 1) { $userl="Member"; } else if($r['user_level'] == 2) { $userl="Admin"; } else if ($r['user_level'] == 3) { $userl="Secretary"; } else if($r['user_level'] == 0) { $userl="NPC"; } else if($r['user_level']==4) { $userl="IRC Mod"; } else {$userl="Assistant"; }

$lon=date('F j, Y g:i:s a',$r['laston']);

$sup=date('F j, Y g:i:s a',$r['signedup']);

$ts=$r['strength']+$r['agility']+$r['guard']+$r['labour']+$r['IQ'];

$d="";

$la=time()-$r['laston'];

$unit="seconds";

if($la >= 60)

{

$la=(int) ($la/60);

$unit="minutes";

}

if($la >= 60)

{

$la=(int) ($la/60);

$unit="hours";

if($la >= 24)

{

$la=(int) ($la/24);

$unit="days";

}

}

if($r['donatordays']) { $r['username'] = "{$r['username']}";$d="donator.gif"; }

if($r['laston'] >= time()-15*60) { $on="Online"; } else { $on="Offline"; }

print "

Profile for {$r['username']}

General Info Financial Info
Display Pic

Name: {$r['username']} [{$r['userid']}] $d

 

User Level: $userl

 

Duties: {$r['duties']}

 

Gender: {$r['gender']}

 

Signed Up: $sup

 

Last Active: $lon

 

Last Action: $la $unit ago

 

Rank: ".get_gamerank($r['level'],$r['hPRICE'],$r)."

 

Online: $on

 

Days Old: {$r['daysold']}

 

Location: {$r['cityname']}

Money: \${$r['money']}

 

Crystals: {$r['crystals']}

 

Property: {$r['hNAME']}

 

Referals: ";

$rr=mysql_query("SELECT * FROM referals WHERE refREFER={$r['userid']}",$c);

print mysql_num_rows($rr);

$q_y=mysql_query("SELECT * FROM friendslist WHERE fl_ADDED={$r['userid']}",$c);

$q_z=mysql_query("SELECT * FROM blacklist WHERE bl_ADDED={$r['userid']}",$c);

print "

 

Friends: ".mysql_num_rows($q_y)."

 

Enemies: ".mysql_num_rows($q_z)."

";

if($r['display_pic'])

{

print "{$r[";

}

else

{

print "This user has no display pic!";

}

print "

Physical InfoLinks

Level: {$r['level']}

 

Health: {$r['hp']}/{$r['maxhp']}

 

Gang: ";

if($r['gang'])

{

print "{$r['gangNAME']}";

}

else

{

print "N/A";

}

if($r['fedjail'])

{

print "

In federal jail for {$r['fed_days']} day(s).

 

{$r['fed_reason']}";

}

if($r['hospital'])

{

print "

In hospital for {$r['hospital']} minutes.

{$r['hospreason']}";

}

if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5)

{

print "

IP Address: {$r['lastip']}";

print "

Staff Notes:

 

{$r['staffnotes']}

 

";

}

print "

[Send Mail]

 

 

[Send Cash]

 

 

[Attack]";

if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5)

{

print "

 

 

[Jail]

 

 

[Hack Users PC]

";

}

if($ir['donatordays'] > 0)

{

print "

 

 

[Add Friends]

 

 

[Add Enemies]

";

}

print "

";

}

}

$h->endpage();

?>

Link to comment
Share on other sites

Re: Game Rank

Here is how mine is set up.

print "

<table>

<tr>

<td>Name: {$ir['username']}</td>

<td>Crystals: {$cm}</td>

</tr>

<tr>

<td>Level: {$ir['level']}</td>

<td>Exp: {$exp}%</td>

</tr>

<tr>

<td>Money: $fm</td>

<td>HP: {$ir['hp']}/{$ir['maxhp']}</td>

</tr>

<tr>

<td>Property: {$ir['hNAME']}</td>

<td>Married: $marital</td>

</tr>

<tr>

<td>Game Rank: ".get_gamerank($ir['level'], $ir['hPRICE'], $ir)."</td>

</tr>

</table>";

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...