17.12.2017, 06:42
Bro how does char.php and chars.php works i need to link to my own DB
This
To this
my database
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\';
?>
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\';
?>
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\');