[Tool/Web/Other] RPUCP - Roleplay User Control Panel (Ideal for RPs)
#28

Bro how does char.php and chars.php works i need to link to my own DB


This
PHP Code:
<?php 
include \'includes/config.php\'
include 
\'includes/header.php\';
checkForLogin();

if(!isset(
$_GET[\'id\']))
{
    echo 
\'<META HTTP-EQUIV="Refresh" Content="0; URL=../pages/index.php">\';    
    exit;    
}

$charaID $_GET[\'id\'];
$sesuID $_SESSION[\'uID\'];

$query $con->prepare("SELECT * from chars where charid = \'$charaID\'");
$query->execute();
$gData $query->fetch();

if(
$gData[\'accountid\'] != $sesuID)
{
    echo 
\'<META HTTP-EQUIV="Refresh" Content="0; URL=../pages/index.php">\';    
    exit;    
}


?>
                <div class="row">
                    <div class="col-md-12">
                        <h1 class="page-header">
                            <?php echo $gData[\'charname\']; ?>
                        </h1>
                    </div>
                </div>

            <div class="row">
                <div class="col-lg-2">
                    <img src="../bigskins/<?php echo $gData[\'charskin\']; ?>.png" style="height:300px;">
                </div>
                <div class="col-lg-8">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-6">
                                Hand Money: $<?php echo number_format($gData[\'playercash\']); ?>
                                <hr />
                                Bank Money: $<?php echo number_format($gData[\'playerbankcash\']); ?>
                                <hr />
                                Total Money: $<?php echo number_format($gData[\'playerbankcash\'] + $gData[\'playercash\']); ?>
                                <hr />
                                Phone Number: <?php if($gData[\'playerphonenumber\'] != 0) echo $gData[\'playerphonenumber\']; 
                                else echo 
"None"?>
                                <hr />
                                Level: <?php echo number_format($gData[\'playerexplevel\']); ?>
                                <hr />
                                Respect Points: <?php echo number_format($gData[\'playerrespoints\']); ?>/(EDIT THIS)
                                <hr />
                                Age: <?php echo number_format($gData[\'playerage\']); ?>
                                <hr />
                                Health: <div class="progress progress-striped active"><div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="<?php echo $gData[\'phealthbar\']; ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $gData[\'phealthbar\']; ?>%"></div></div>
                                <hr />
                                Armour: <div class="progress progress-striped active"><div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="<?php echo $gData[\'parmourbar\']; ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $gData[\'parmourbar\']; ?>%"></div></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

<?php
include \'includes/footer.php\'
?>
To this
PHP Code:
<?php 
include \'includes/config.php\'
include 
\'includes/header.php\';
checkForLogin();

if(!isset(
$_GET[\'id\']))
{
    echo 
\'<META HTTP-EQUIV="Refresh" Content="0; URL=../pages/index.php">\';    
    exit;    
}

$charaID $_GET[\'id\'];
$sesuID $_SESSION[\'ID\'];

$query $con->prepare("SELECT * from accounts where username = \'$ID\'");
$query->execute();
$gData $query->fetch();

if(
$gData[\'Accountid\'] != $sesuID)
{
    echo 
\'<META HTTP-EQUIV="Refresh" Content="0; URL=../pages/index.php">\';    
    exit;    
}


?>
                <div class="row">
                    <div class="col-md-12">
                        <h1 class="page-header">
                            <?php echo $gData[\'username\']; ?>
                        </h1>
                    </div>
                </div>

            <div class="row">
                <div class="col-lg-2">
                    <img src="../bigskins/<?php echo $gData[\'model\']; ?>.png" style="height:300px;">
                </div>
                <div class="col-lg-8">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-6">
                                Hand Money: $<?php echo number_format($gData[\'money\']); ?>
                                <hr />
                                Bank Money: $<?php echo number_format($gData[\'bank\']); ?>
                                <hr />
                                Total Money: $<?php echo number_format($gData[\'bank\'] + $gData[\'money\']); ?>
                                <hr />
                                Phone Number: <?php if($gData[\'phonenr\'] != 0) echo $gData[\'phonenr\']; 
                                else echo 
"None"?>
                                <hr />
                                Level: <?php echo number_format($gData[\'level\']); ?>
                                <hr />
                                Respect Points: <?php echo number_format($gData[\'respect\']); ?>
                                <hr />
                                Age: <?php echo number_format($gData[\'age\']); ?>
                                <hr />
                                Health: <div class="progress progress-striped active"><div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="<?php echo $gData[\'phealth\']; ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $gData[\'phealth\']; ?>%"></div></div>
                                <hr />
                                Armour: <div class="progress progress-striped active"><div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="<?php echo $gData[\'parmor\']; ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $gData[\'parmor\']; ?>%"></div></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

<?php
include \'includes/footer.php\'
?>
my database

Code:
`test`.`accounts` (`id`, `Online`, `UpdateDate`, `RegiDate`, `LastLogin`, `Username`, `Key`, `Email`, `IP`, `SecureIP`, `Registered`, `ConnectedTime`, `Sex`, `Age`, `BirthDate`, `Band`, `PermBand`, `Warnings`, `Disabled`, `Level`, `AdminLevel`, `SeniorModerator`, `DonateRank`, `Respect`, `XP`, `Money`, `Bank`, `pHealth`, `pArmor`, `pSHealth`, `Int`, `VirtualWorld`, `Model`, `SPos_x`, `SPos_y`, `SPos_z`, `SPos_r`, `BanAppealer`, `PR`, `HR`, `AP`, `Security`, `ShopTech`, `FactionModerator`, `GangModerator`, `Undercover`, `TogReports`, `Radio`, `RadioFreq`, `UpgradePoints`, `Origin`, `Muted`, `Crimes`, `Accent`, `CHits`, `FHits`, `Arrested`, `Phonebook`, `LottoNr`, `Fishes`, `BiggestFish`, `Job`, `Job2`, `Paycheck`, `HeadValue`, `Jailed`, `JailTime`, `WRestricted`, `Materials`, `Crates`, `Pot`, `Crack`, `Nation`, `Leader`, `Member`, `Division`, `FMember`, `Rank`, `DetSkill`, `SexSkill`, `BoxSkill`, `LawSkill`, `MechSkill`, `TruckSkill`, `DrugsSkill`, `ArmsSkill`, `SmugglerSkill`, `FishSkill`, `FightingStyle`, `PhoneNr`, `Apartment`, `Apartment2`, `Renting`, `CarLic`, `FlyLic`, `BoatLic`, `FishLic`, `CheckCash`, `Checks`, `GunLic`, `Gun0`, `Gun1`, `Gun2`, `Gun3`, `Gun4`, `Gun5`, `Gun6`, `Gun7`, `Gun8`, `Gun9`, `Gun10`, `Gun11`, `DrugsTime`, `LawyerTime`, `LawyerFreeTime`, `MechTime`, `SexTime`, `PayDay`, `PayDayHad`, `CDPlayer`, `Dice`, `Spraycan`, `Rope`, `Cigars`, `Sprunk`, `Bombs`, `Wins`, `Loses`, `Tutorial`, `OnDuty`, `Hospital`, `Married`, `MarriedID`, `MarriedTo`, `ContractBy`, `ContractDetail`, `WantedLevel`, `Insurance`, `NewMuted`, `NewMutedTotal`, `AdMuted`, `AdMutedTotal`, `HelpMute`, `Helper`, `ReportMuted`, `ReportMutedTotal`, `ReportMutedTime`, `VIPMuted`, `VIPMutedTime`, `GiftTime`, `AdvisorDutyHours`, `AcceptedHelp`, `AcceptReport`, `ShopTechOrders`, `TrashReport`, `GangWarn`, `FactionBanned`, `CSFBanned`, `VIPInviteDay`, `TempVIP`, `BuddyInvite`, `Tokens`, `PTokens`, `TriageTime`, `PrisonedBy`, `PrisonReason`, `Flag`, `TaxiLicense`, `TicketTime`, `Screwdriver`, `Smslog`, `Wristwatch`, `Surveillance`, `Tire`, `Firstaid`, `Rccam`, `Receiver`, `GPS`, `Sweep`, `SweepLeft`, `Bugged`, `pWExists`, `pWX`, `pWY`, `pWZ`, `pWVW`, `pWInt`, `pWValue`, `pWSeeds`, `Warrants`, `JudgeJailTime`, `JudgeJailType`, `BeingSentenced`, `ProbationTime`, `DMKills`, `Order`, `OrderConfirmed`, `CallsAccepted`, `PatientsDelivered`, `LiveBanned`, `FreezeBank`, `FreezeHouse`, `FreezeCar`, `Hydration`, `DoubleEXP`, `EXPToken`, `RacePlayerLaps`, `Ringtone`, `VIPM`, `VIPMO`, `VIPExpire`, `VIPSold`, `GVip`, `Speedo`, `Firework`, `Boombox`, `DrawChance`, `GoldBoxTokens`, `RewardHours`, `DMRMuted`, `Watchdog`, `CarsRestricted`, `Flagged`, `LepPoints`, `LepSafePoints`, `LastCarWarning`, `CarWarns`, `Scripter`, `Hours`, `Paper`, `MailEnabled`, `Mailbox`, `UnreadMails`, `TreasureSkill`, `MetalDetector`, `HelpedBefore`, `Business`, `BusinessRank`, `Trickortreat`, `RHMutes`, `RHMuteTime`, `GiftCode`, `Table`, `OpiumSeeds`, `RawOpium`, `Heroin`, `Syringe`, `Skins`, `Hunger`, `HungerTimer`, `HungerDeathTimer`, `Fitness`, `Credits`, `LastCharmReceived`, `HealthCare`, `TotalCredits`, `911Muted`, `ForcePasswordChange`, `ReceivedCredits`, `Pin`, `RimMod`, `Tazer`, `Cuff`, `CarVoucher`, `ReferredBy`, `PendingRefReward`, `Refers`, `Developer`, `Famed`, `FamedMuted`, `DefendTime`, `VehicleSlot`, `PVIPVoucher`, `ToySlot`, `RFLTeam`, `RFLTeamL`, `VehVoucher`, `SVIPVoucher`, `GVIPVoucher`, `GiftVoucher`, `FallIntoFun`, `ContactSlot`, `HungerVoucher`, `Vials`, `BoughtCure`, `AdvertVoucher`, `ShopCounter`, `ShopNotice`, `SVIPExVoucher`, `GVIPExVoucher`, `VIPSellable`, `ReceivedPrize`) VALUES (\'\', \'0\', \'\', NULL, NULL, \'\', \'\', \'\', \'0.0.0.0\', \'0.0.0.0\', \'0\', \'0\', \'1\', \'18\', \'0000-00-00\', \'0\', \'0\', \'0\', \'0\', \'1\', \'0\', \'0\', \'0\', \'0\', \'0\', \'5000\', \'20000\', \'50.00000\', \'0.00000\', \'0.00000\', \'0\', \'0\', \'299\', \'0.00000\', \'0.00000\', \'0.00000\', \'0.00000\', \'0\', \'0\', \'0\', \'1\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'-1\', \'-1\', \'-1\', \'255\', \'-1\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'-1\', \'-1\', \'-1\', \'1\', \'0\', \'1\', \'1\', \'0\', \'0\', \'1\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'-1\', \'Nobody\', \'Nobody\', \'None\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'Nobody\', \'None\', \'\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0.00000\', \'0.00000\', \'0.00000\', \'0\', \'0\', \'-1\', \'0\', \'\', \'0\', \'0\', \'0\', \'0\', \'0\', \'\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0.00000\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'1\', \'0\', \'0\', \'0\', \'0\', \'0\', \'-1\', \'-1\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'50\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'\', \'0\', \'0\', \'0\', \'0\', \'Nobody\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'-1\', \'-1\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\', \'0\');
Reply


Messages In This Thread
RPUCP - Roleplay User Control Panel (Ideal for RPs) - by SecretBoss - 08.06.2016, 12:31
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by zSuYaNw - 08.06.2016, 12:33
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by SyS - 08.06.2016, 12:37
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by SecretBoss - 08.06.2016, 12:43
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by Roozevelt - 08.06.2016, 12:55
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by SecretBoss - 08.06.2016, 13:37
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by kelvinis - 08.06.2016, 14:45
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by xXtremeXx - 08.06.2016, 15:22
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by kelvinis - 08.06.2016, 18:35
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by SecretBoss - 08.06.2016, 20:25
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by Luis- - 08.06.2016, 20:29
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by Alexandriel - 09.06.2016, 03:48
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by kelvinis - 09.06.2016, 05:26
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by justice96 - 09.06.2016, 05:32
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by SecretBoss - 09.06.2016, 10:00
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by Dice_ - 09.06.2016, 10:13
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by markparker12 - 09.06.2016, 10:13
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by SecretBoss - 09.06.2016, 10:36
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by kelvinis - 09.06.2016, 15:30
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by JasperM - 09.06.2016, 15:56
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by SecretBoss - 09.06.2016, 17:36
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by nemanjasepa - 30.06.2016, 08:18
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by djhiago - 03.07.2016, 14:22
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by SecretBoss - 03.07.2016, 14:47
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by Pearson - 19.07.2016, 23:49
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by Fratello - 26.07.2016, 19:00
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by Tudounaozi - 27.04.2017, 08:11
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by andySix - 17.12.2017, 06:42
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by Astonish - 23.01.2018, 17:00
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by Astonish - 11.02.2018, 09:50
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by DLR - 14.02.2018, 11:41
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by Janpatrick22 - 14.02.2018, 13:19
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by Davidmkd123 - 25.02.2018, 17:26
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by DLR - 26.02.2018, 17:39
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by cuber - 26.02.2018, 17:57
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by DarkChildren - 26.02.2018, 18:13
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by N0FeaR - 26.02.2018, 21:20
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by RODELA - 18.04.2018, 17:23
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by vsskamal - 25.05.2018, 08:48
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by PhantomThief1412 - 29.05.2018, 06:31
Re: RPUCP - Roleplay User Control Panel (Ideal for RPs) - by graceda - 10.06.2018, 14:12

Forum Jump:


Users browsing this thread: 14 Guest(s)