[RP] LAPD Tab [RP]

Status
Not open for further replies.

Thomas-Ryan

New Member
Jan 13, 2011
25
1
Hiya guys, Just wanted to release this. Last night I got a little bored and made a LAPD tab on my retro. On the tab it has the laws and the wanted page and the LAPD Team.

Pages

Ok, Do this in Community_Header.

PHP:
LAPD Tab Code. Add this under the bussiness tab.
            <li<?php if($page['cat'] == "LAPD"){ echo "

class=\"selected\""; } ?>>
            <?php if($page['cat'] == "LAPD"){ echo 

"<strong>LAPD</strong>"; }else{ echo "<a

href=\"".PATH."/laws\">LAPD</a>"; } ?>
            <span></span>
        </li>
Add this under the Bussiness tab info (near the bottom of the page)
PHP:
        break;
    case "LAPD":
?>
<div id="navi2-container" class="pngbg">
    <div id="navi2" class="pngbg clearfix">
        <ul>
            <li class="<?php if($page['id'] == "laws"){ 

echo "selected"; } ?> last">
                <?php if($page['id'] == "laws"){ echo 

'City Laws'; }else{ echo "<a href=\"".PATH."/laws\">City Laws</a>"; } 

?>
            </li>
                        <li class="<?php if($page['id'] == "wanted_users"){

echo "selected"; } ?> last">
                <?php if($page['id'] == "wanted_users"){ echo

'Wanted Users'; }else{ echo "<a href=\"".PATH."/wanted_users\">Wanted Users</a>"; }

?>
            </li>
                        <li class="<?php if($page['id'] == "lapd_info"){

echo "selected"; } ?> last">
                <?php if($page['id'] == "lapd_info"){ echo

'LAPD Team'; }else{ echo "<a href=\"".PATH."/lapd_info?id=1\">LAPD Team</a>"; }

?>
            </li>
        </ul>
    </div>
</div>
<?php
'lapd_info page'. If you alredy have the 'jobs_info' page just copy it and re-name one.
PHP:
<?php
/*================================================================+\
|| # PHPRetro - An extendable virtual hotel site and management
|+==================================================================
|| # Copyright (C) 2009 Yifan Lu. All rights reserved.
|| # http://www.yifanlu.com
|| # 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
|| # http://opensource.org/licenses/gpl-license.php
\+================================================================*/

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

$page['id'] = "lapd_info";
$page['name'] = 'LAPD Team';
$page['bodyid'] = "home";
$page['cat'] = "LAPD";

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

$getCorpID = $input->FilterText($_GET['id']);
?>

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

    <div class="habblet-container ">

<?php
$getRank = mysql_query("SELECT * FROM jobs_ranks WHERE corp_id = '".$getCorpID."';");
$count = mysql_num_rows($getRank);
for ($i=1; $i<=$count; $i++)
{
  $getRankInfo = mysql_query("SELECT * FROM jobs_ranks WHERE corp_id = '".$getCorpID."' && job_rank = '".$i."'");
  $rankInfo = mysql_fetch_array($getRankInfo);
  $getUserInfo = mysql_query("SELECT * FROM users WHERE secure_id = '".$rankInfo['id']."'");
?>
                          <div class="cbb clearfix blue ">

                            <h2 class="title"><?php echo $rankInfo['motto'].' ('.mysql_num_rows($getUserInfo).')'; ?>
                            </h2>
<p class="credits-countries-select">
<?php
while($UserInfo = mysql_fetch_array($getUserInfo)){
  echo '<img src="http://www.habbo.com/habbo-imaging/avatarimage?figure='.$UserInfo['figure'].'&size=s&direction=2&head_direction=3&gesture=sml&size=m" align="left"><strong><a href="#">'.$UserInfo['name'].'</a></strong><br />'.$UserInfo['mission'].'<br /><br />Last visit: '.$UserInfo['lastvisit'].'<br /><br />';
}
?>
</p>
                                </div>
<?php
}
?>

                </div>
</div>
<div id="column2" class="column">
                <div class="habblet-container ">
                        <div class="cbb clearfix blue ">
<?php
$getCorp = mysql_query("SELECT * FROM jobs_corps WHERE id = '".$getCorpID."'");
$corpInfo = mysql_fetch_array($getCorp);
$getOwner = mysql_query("SELECT * FROM users WHERE id = '".$corpInfo['owner']."'");
$owner = mysql_fetch_array($getOwner);
?>
                            <h2 class="title"><?php echo $corpInfo['corp_name']; ?>
                            </h2>
                        <div id="purse-habblet">

<div class="box-content">
<?php echo '<strong>Balance</strong>: '.$corpInfo['corp_balance']; ?>
</div>
</div>


                    </div>
                        <div class="cbb clearfix blue ">
                            <h2 class="title">Owner
                            </h2>
                        <div id="purse-habblet">

<div class="box-content">
<?php
echo '<img src="http://www.habbo.com/habbo-imaging/avatarimage?figure='.$owner['figure'].'&size=b&direction=2&head_direction=3&gesture=sml&size=m" align="left"><a href="#"><strong>'.$owner['name'].'</strong></a><br />'.$owner['mission'].'<br /><br /><strong>Last visit</strong>:<br />'.$owner['lastvisit'];
?>
</div>
</div>


                    </div>
                </div
</div>

<?php require_once('./templates/community_footer.php'); ?>
'laws Page'. You can edit the laws to what you like.
PHP:
<?php
/*================================================================+\
|| # PHPRetro - An extendable virtual hotel site and management
|+==================================================================
|| # Copyright (C) 2009 Yifan Lu. All rights reserved.
|| # http://www.yifanlu.com
|| # 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
|| # http://opensource.org/licenses/gpl-license.php
\+================================================================*/

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

$page['id'] = "laws";
$page['name'] = 'City Laws';
$page['bodyid'] = "home";
$page['cat'] = "LAPD";

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"><span style="float: center;">City Laws</span>
                            </h2>
<div class="box-content">

To ensure a peaceful city, and to avoid confusion throughout gameplay, a list of laws provided by the city government has been issued for effect of all civilians of the city. If in case a civilian has abused a law in any way, shape or form, they are to be sentenced by the police <i>to jail</i>.
<br><br>
<b>Assaulting/Fighting</b>
<br><br>
As if any user is caught in a fight or has been witnessed by a cop itself assaulting another user, they are to be sentenced to jail for <u>15 minutes</u>. If the case is when a user has assaulted a officer, they are to be sentenced for <u>20 minutes</u> in jail. Anything that looks like a assault is arrestable, does not matter if you typed it out, or anything, the only acceptable use of a fake punch if  a OOC (Out-of-Character) symbol <b>[]</b> has been added anywhere after you send out your fake punch.
<br><br>
<b>Slapping</b>
<br><br>
Slapping is <b>not</b> arrestable by any means, except if you were to slap a officer. If you slapped an officer, they have the right at their own decision to either arrest you or not. If a officer decides to arrest, they must sentence you to jail for <u>10 minutes</u>.
<br><br>
<b>Harassment/Bullying</b>
<br><br>
If a cop has noticed you are making someone feel not welcomed, or making them feel angry by teasing, calling names, or harassing in any way, and sarcasm also falls in this position. Nobody deserves to be treated different, if you harass, you will be warned by a cop, if continued, you will be arrested for <u>20 minutes</u>. If you further continue, it shall be reported to higher authority and delt with administration.
<br><br>
<b>Obsessive Cursing</b>
<br><br>
If you are noticed to being non-stop cursing in the hotel, also similiar to spam, a cop will warn you, but if you continue, you will be arrested for <u>10 minutes</u>, if you continue further, you will be notified to higher authority, and administration will be delt with.
<br><br>
<b>Hacking/Scripting</b>
<br><br>
It is best for cops not to deal with this situation except for contact someone with higher powers to deal with the person. If you are caught hacking/scripting any parts of the hotel, you will be banned for <b>31 days</b> if continued, you will be banned forever.
<br><br>
<b>Obsessive push/pull</b>
<br><br>
If a user is tired of being pushed or pulled, they may tell a cop, then the cop shall warn the user to stop pushing/pulling, but if the user decides to continue anyway, they shall be arrested for <u>10 minutes</u>.
<br><br>
<b>JailBreaking</b>
<br><br>
If a user is jailbreaking, they are to be sentenced <u>15 minutes</u> in jail. Jailbreaking must be witnessed, and convicts of jail can not be announced as witnesses. Users who are not arrested, may be a witness in the case.
<br><br>
<b>Obstructing an arrest</b>
<br><br>
If in any case you are blocking a police officer, or push/pull them away from arresting a user, this is a serious offence, and is delt with high authority time limit. If you are obstructing an officer from doing their job, you will be sentenced <u>20 minutes</u> in jail.
<br><br>
<b>City Expulsion</b>
<br><br>
The new system of city expulsion has been added, since we know many users tend' to cause lots of disruption towards the hotel. If you have caused anything to disrupt the hotel from working properly such as scripting, or other some sort, this is the rule of expulsion.
<br><br>
<b>1st Offence:</b> The user will be delt with the administration in a meeting, as well as banned for <b>24 hours</b>.
<br><br>
<b>2nd Offence:</b> The user will <b>not</b> attend a meeting, but instantly be banned for <b>31 days</b>.
<br><br>
<b>3nd Offence:</b> The user will be banned for <b>1 year</b> length or whatever staff feels necessary, and their jobs will be revoked.
<br><br>
<i>All users who are expelled from city limits, will include their IP address blocked.</i>
<br><br>
<b>Evading an arrest</b>
<br><br>
If a user is caught evading a arrest which includes a user running from the cop into another room, is considered evade, and the user should be sentenced <u>10 extra minutes</u> from their original arrest time.
<br><br>
<b>Logging an arrest</b>
<br><br>
If a user has logged out of an arrest, you will have 15 seconds before they logout, and therefore <u>15 minutes</u> must be added to their original arrest time.
<br><br>
<b>Abuse of 911</b>
<br><br>
If a user has abused 911 by either spam or non-emergencies, they shall be arrested for <u>20 minutes</u> with no warning.
<br><br><br><br>
</div>
</div>
</div>
</script>
<?php require_once('./templates/community_footer.php'); ?>
'wanted_users' page.
PHP:
<?php
/*================================================================+\
|| # PHPRetro - An extendable virtual hotel site and management
|+==================================================================
|| # Copyright (C) 2009 Yifan Lu. All rights reserved.
|| # http://www.yifanlu.com
|| # 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
|| # http://opensource.org/licenses/gpl-license.php
\+================================================================*/

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

$page['id'] = "wanted_users";
$page['name'] = "Wanted users";
$page['bodyid'] = "home";
$page['cat'] = "LAPD";

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">Wanted Users!</h2>
                        <div id="notfound-content" class="box-content">
<table width="100%">
Below you will see who has been noted as wanted which means they basically need to be arrested!<br /><br />
<?php
    $sql = "SELECT name,wanted,figure,sex,id FROM users WHERE wanted = 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['wanted'] == "1")
        {
        }
{
  $s_username = $row['name'];
  $s_figure = 'http://www.habbo.com/habbo-imaging/avatarimage?figure='.$row['figure'].'&size=b&direction=2&head_direction=3&gesture=sm l &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 wanted by the LAPD!</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 wanted for being arrested! <br /><br />So look out!
</table>
    </div>

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






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

Goto the users table, add a new collum called "wanted" (with no quotation marks) with the values, init 1 default 0.
Commands

:addwanted <username>
PHP:
region :addwanted <user> 
                    case "addwanted": 
                        { 
                            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 wanted list!*"); 
                                            dbClient.runQuery("UPDATE users SET wanted = '1' WHERE name = '" + User._Username + "'"); 
                                            userManager.sendToCop(1, false, "BK" + "" + User._Username + " has been added to the wanted list by " + _Username + "!"); 
                                        } 
                                    } 
                                } 
                            } 
                            break; 
                        } 
                    #endregion
:removewanted <username>

PHP:
#region :removewanted <user> 
                    case "removewanted": 
                        { 
                            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 wanted list!*"); 
                                            dbClient.runQuery("UPDATE users SET wanted = '0' WHERE name = '" + User._Username + "'"); 
                                            userManager.sendToCop(1, false, "BK" + "" + User._Username + " has been removed from the wanted list by " + _Username + "!"); 
                                        } 
                                    } 
                                } 
                            } 
                            break; 
                        } 
                    #endregion
:arrest <user> <time> - Been edited to remove their wanted stats when arrested.
PHP:
#region :arrest <user> <time> 
                    case "arrest": 
                        { 
                            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 (User._roomID == _roomID && (roomUser.Y == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y + 1 == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y - 1 == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y == User.roomUser.Y && roomUser.X + 1 == User.roomUser.X) || (roomUser.Y == User.roomUser.Y && roomUser.X - 1 == User.roomUser.X)) 
                                        { 
                                            if (canarrest == 1) 
                                            { 
                                                if (User.roomUser.walkLock == false) 
                                                { 
                                                    Room.sendSaying(roomUser, "*attempts to arrest " + User._Username + ", but notices that he is not cuffed*"); 
                                                } 
                                                else 
                                                { 
                                                    int time = int.Parse(args[2]); 
                                                    if (time > 60 || time < 1) 
                                                    { 
                                                        sendData("BK" + "What exactly are you trying to do?"); 
                                                    } 
                                                    else 
                                                    { 
                                                        dbClient.runQuery("UPDATE users SET arrested = '1', wanted = '0' arrests = arrests + '1', time_jail = '" + args[2] + "' WHERE name = '" + User._Username + "'"); 

                                                        int fine = time * 5; 
                                                        dbClient.runQuery("UPDATE users SET credits = credits - '" + fine + "' WHERE name = '" + User._Username + "'"); 
                                                        refreshValueables(true, false); 

                                                        Room.sendSaying(roomUser, "*arrests " + User._Username + " for " + time + " minutes, and fines them " + fine + " credits*"); 

                                                        User.sendData("D^" + "H" + Encoding.encodeVL64(112)); 
                                                        User.sendData("BK" + "You have been arrested by " + _Username + ", and fined " + fine + " credits!"); 

                                                        ThreadStart jailStarter = new ThreadStart(User.jailTime); 
                                                        User.jailLooper = new Thread(jailStarter); 
                                                        User.jailLooper.Priority = ThreadPriority.Lowest; 
                                                        User.jailLooper.Start(); 
                                                    } 
                                                } 
                                            } 
                                        } 
                                    } 
                                } 
                            } 
                            break; 
                        } 
                    #endregion
I might add some images later

Credits
Craig - wanted page + commands.
Rastalulz - for the CMS that I made this on.
The guy who made the 'laws' page.
Me - Putting this all together and doing the LAPD team.

Thanks Button Is Always There.

Rate ?/10
 

Thomas-Ryan

New Member
Jan 13, 2011
25
1
Thanks Kieren. To be honest I have not had much time to do screenshots becuase I have beem busy with my hotel and yes I will see some more releases from me.
 
Status
Not open for further replies.

Users who are viewing this thread

Top