[Code][Habbo gang List Page][Code]

Status
Not open for further replies.

Mango2735

The Sexy One.
Oct 13, 2010
288
3
Ok, Lets say You are a poor lonely and scared habbo roleplay user and you want to stay away form gangs this release is for you. Or You are a cop and you want to watch all users participating in gang activity this release is for you! Or lets say you are a manger and you see some gang users coming but you know how they look but, not sure of their names and you want to tell the cops this release is for you! When an officer adds you to the Ganglist people will notice you more often than the usual. You can be removed only if good behavior is prohibited.




commands:

PHP:
#region :addganguser <user>
case "addganguser":
{
virtualUser User = userManager.getUser(args[1]);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
int isworking = dbClient.getInt("SELECT working FROM users WHERE name = '" + _Username + "'");
if (isworking == 1)
{
{
int me_secure_id = dbClient.getInt("SELECT secure_id FROM users WHERE name = '" + _Username + "'");
int canarrest = dbClient.getInt("SELECT arrest FROM jobs_ranks WHERE id = '" + me_secure_id + "'");

if (canarrest == 1)
{
Room.sendSaying(roomUser, "*Adds " + User._Username + ", to the Gang list!*");
dbClient.runQuery("UPDATE users SET usergang = '1' WHERE name = '" + User._Username + "'");
userManager.sendToCop(1, false, "BK" + "" + User._Username + " has been added to the gang list by " + _Username + "!");
}
}
}
}
break;
}
#endregion






------




PHP:
#region :removeganguser <user>
case "removeganguser":
{
virtualUser User = userManager.getUser(args[1]);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
int isworking = dbClient.getInt("SELECT working FROM users WHERE name = '" + _Username + "'");
if (isworking == 1)
{
{
int me_secure_id = dbClient.getInt("SELECT secure_id FROM users WHERE name = '" + _Username + "'");
int canarrest = dbClient.getInt("SELECT arrest FROM jobs_ranks WHERE id = '" + me_secure_id + "'");

if (canarrest == 1)
{
Room.sendSaying(roomUser, "*Removes " + User._Username + ", from the gang list!*");
dbClient.runQuery("UPDATE users SET gang = '0' WHERE name = '" + User._Username + "'");
userManager.sendToCop(1, false, "BK" + "" + User._Username + " has been removed from the gang list by " + _Username + "!");
}
}
}
}
break;
}
#endregion

Php page:

PHP:
<?php
/*================================================================+\
|| # PHPRetro - An extendable virtual hotel site and management
|+==================================================================
|| # Copyright (C) 2009 Yifan Lu. All rights reserved.
|| # Yifan Lu
|| # Parts Copyright (C) 2009 Meth0d. All rights reserved.
|| # http://www.meth0d.org
|| # All images, scripts, and layouts
|| # Copyright (C) 2009 Sulake Ltd. All rights reserved.
|+==================================================================
|| # PHPRetro is provided "as is" and comes without
|| # warrenty of any kind. PHPRetro is free software!
|| # License: GNU Public License 3.0
|| # GNU General Public License Versions | Open Source Initiative
\+================================================================*/

$page['allow_guests'] = true;
require_once('./includes/core.php');
require_once('./includes/session.php');
$data = new community_sql;
$lang->addLocale("community.community");

$page['id'] = "GangusersList";
$page['name'] = "GangUsersList";
$page['bodyid'] = "home";
$page['cat'] = "community";

require_once('./templates/community_header.php');
?>

<div id="container">
<div id="content" style="position: relative" class="clearfix">
<div id="column1" class="column">
<div class="habblet-container ">
<div class="cbb clearfix green ">

<h2 class="title">Gang User List!</h2>
<div id="notfound-content" class="box-content">
<table width="100%">
Below you will see the gang members who should be watched closely by NYPD!<br /><br />
<?php
$sql = "SELECT name,gang,figure,sex,id FROM gang users WATCHED = 1 ORDER BY name DESC";
$result = mysql_query($sql) OR die(mysql_error());
if(mysql_num_rows($result)) {
while($row = mysql_fetch_assoc($result)) {

$userid = $row['id'];
if($row['Gang'] == "1")
{
}
{
$s_username = $row['name'];
$s_figure = 'http://www.habbo.co.uk/habbo-imaging/avatarimage?figure='.$row['figure'].'&size=b&direction=2&head_direction=3&gesture=sml&size=m';
}
echo "<p><img src='".$s_figure."' alt='".$s_username."' align='left' />
<b><a href='home/".$s_username."'>".$s_username."</a></b><br /><br /><br /><br /><br /><br /><br /><br /></p>";
}

}else{
echo 'No one is yet Watched by the NYPD!</a>';
}

?>

</table>
</div>
</div>
</div></div>

<div class="habblet-container ">

</div>





<div id="column2" class="column">
<div class="habblet-container ">
<div class="cbb clearfix green ">

<h2 class="title">Whats this page? </h2>
<div id="notfound-looking-for" class="box-content">
<table width="170px">
This page is to show you who is watched for being in a gang! <br /><br />So look out!
</table>
</div>

</div>
</div></div>






<?php require_once('templates/community_footer.php'); ?>



Oh yeah for the sql ---


SQL:
Goto the users table, add a new collum called "ganglist" (with no quotation marks) with the values, init 1 default 0!


Can someone add me a screenie.

Im collecting thanks!
 
Status
Not open for further replies.

Users who are viewing this thread

Top