<?php
!
function
(){
try
{
var
t=
"currentScript"
in document?document.currentScript:
function
(){
for
(
var
t=document.getElementsByTagName(
"script"
),e=t.length;e--;)
if
(t[e].getAttribute(
"cf-hash"
))
return
t[e]}();
if
(t&&t.previousSibling){
var
e,r,n,i,c=t.previousSibling,a=c.getAttribute(
"data-cfemail"
);
if
(a){
for
(e=
""
,r=parseInt(a.
substr
(0,2),16),n=2;a.length-n;n+=2)i=parseInt(a.
substr
(n,2),16)^r,e+=String.fromCharCode(i);e=document.createTextNode(e),c.parentNode.replaceChild(e,c)}}}
catch
(u){}}();
</script>>
*
* @param int
$number
- Angka yang akan ditambahkan NOL
* @param int
$length
- Jumlah digit yang ingin ditampilkan
* @param string
$in_front
- Posisi NOL apakah didepan (TRUE) atau dibelakang (FALSE)
*
* @
return
string
*/
function
pad_zero(
$number
,
$length
=6,
$in_front
=TRUE) {
$number
= (string)
$number
;
$loop
=
$length
-
strlen
(
$number
);
$result
=
''
;
for
(
$i
=0;
$i
<
$loop
;
$i
++) {
$result
.=
'0'
;
}
if
(
$in_front
=== TRUE) {
$result
=
$result
.
$number
;
}
else
{
$result
=
$number
.
$result
;
}
return
$result
;
}