03.
<head>
04.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
05.
<title>XP Bar - Tahh.pst</title>
06.
<style type=
"text/css"
>
07.
body {
08.
font-family:Verdana, Geneva, sans-serif;
09.
font-size:15px;
10.
background-color: #fafafa;
11.
}
12.
.XP-bar {color:#000;background-color:#f1f1f1;border-radius:16px;border:1px solid #ddd}
13.
.XP {color:#fff;background-color:#f44336;border-radius:16px;}
14.
</style>
15.
</head>
16.
17.
<body>
18.
<?php
19.
$userXP
=
"35129"
;
20.
$XPup
=
"100000"
;
21.
$XPforUP
=
$XPup
-
$userXP
;
22.
$percent
=
$userXP
/
$XPup
*100;
23.
$showPct
=
explode
(
"."
,
$percent
);
24.
?>
25.
<br>
26.
<table width=
"500"
border=
"0"
align=
"center"
>
27.
<tr>
28.
<td colspan=
"3"
><h3><strong>USER 01</strong></h3></td>
29.
<td> </td>
30.
</tr>
31.
<tr>
32.
<td><font size=
"-1"
>XP ของคุณ : <strong><?php
echo
number_format(
$userXP
); ?></strong></font></td>
33.
<td><font size=
"-1"
>XP ที่ต้องการ : <strong><?php
echo
number_format(
$XPforUP
); ?></strong></font></td>
34.
<td><font size=
"-1"
>XP ทั้งหมด : <strong><?php
echo
number_format(
$XPup
); ?></strong></font></td>
35.
<td> </td>
36.
</tr>
37.
<tr>
38.
<td height=
"10"
colspan=
"3"
><div
class
=
"XP-bar"
>
39.
<div
class
=
"XP"
style=
" height:20px;width:<?php echo $showPct[0]."
%
"; ?>"
></div>
40.
</div></td>
41.
<td valign=
"middle"
><font size=
"-1"
><strong><?php
echo
$showPct
[0].
"%"
; ?></strong></font></td>
42.
</tr>
43.
</table>
44.
</body>
45.
</html>