<ol
class
=
"dp-xml"
>
<li
class
=
"alt"
><span><strong><font color=
"#006699"
><span
class
=
"tag"
><?</SPAN><SPAN
class
=tag-name>php</SPAN></FONT></STRONG><SPAN> </SPAN></SPAN><LI
class
=
""
><SPAN>
class
class_post </SPAN><LI
class
=alt><SPAN>{ </SPAN><LI
class
=
""
><SPAN>
<li
class
=
"alt"
><span> } </span></li>
<li
class
=
""
><span> </span></li>
<li
class
=
"alt"
><span>
<li
class
=
""
><span>
function
data_join(&
$data
) </span></li>
<li
class
=
"alt"
><span> { </span></li>
<li
class
=
""
><span>
if
(get_magic_quotes_gpc() == false) </span></li>
<li
class
=
"alt"
><span> { </span></li>
<li
class
=
""
><span>
if
(
is_array
(
$data
)) </span></li>
<li
class
=
"alt"
><span> { </span></li>
<li
class
=
""
>
<span>
foreach
(
$data
as
$</span><span
class
=
"attribute"
><font color=
"#ff0000"
>k</font></span><span> =</span><span
class
=
"tag"
><strong><font color=
"#006699"
>></font></strong></span><span>
$v
) </span>
</li>
<li
class
=
"alt"
><span> { </span></li>
<li
class
=
""
><span>
$data
[
$k
] =
addslashes
(
$v
); </span></li>
<li
class
=
"alt"
><span> } </span></li>
<li
class
=
""
><span> } </span></li>
<li
class
=
"alt"
><span>
else
</span></li>
<li
class
=
""
><span> { </span></li>
<li
class
=
"alt"
>
<span> $</span><span
class
=
"attribute"
><font color=
"#ff0000"
>data</font></span><span> = </span><span
class
=
"attribute-value"
><font color=
"#0000ff"
>
addslashes
</font></span><span>(
$data
); </span>
</li>
<li
class
=
""
><span> } </span></li>
<li
class
=
"alt"
><span> } </span></li>
<li
class
=
""
><span> Return
$data
;
return
(preg_match(
"/^(((d{3}))|(d{3}-))?((0d{2,3})|0d{2,3}-)?[1-9]d{6,7}$/"
,
$str
))?true:false; </span></li>
<li
class
=
"alt"
><span> } </span></li>
<li
class
=
""
><span> </span></li>
<li
class
=
"alt"
><span>
<li
class
=
""
><span>
function
data_revert(&
$data
) </span></li>
<li
class
=
"alt"
><span> { </span></li>
<li
class
=
""
><span>
if
(
is_array
(
$data
)) </span></li>
<li
class
=
"alt"
><span> { </span></li>
<li
class
=
""
>
<span>
foreach
(
$data
as
$</span><span
class
=
"attribute"
><font color=
"#ff0000"
>k1</font></span><span> =</span><span
class
=
"tag"
><strong><font color=
"#006699"
>></font></strong></span><span>
$v1
) </span>
</li>
<li
class
=
"alt"
><span> { </span></li>
<li
class
=
""
><span>
if
(
is_array
(
$v1
)) </span></li>
<li
class
=
"alt"
><span> { </span></li>
<li
class
=
""
>
<span>
foreach
(
$v1
as
$</span><span
class
=
"attribute"
><font color=
"#ff0000"
>k2</font></span><span> =</span><span
class
=
"tag"
><strong><font color=
"#006699"
>></font></strong></span><span>
$v2
) </span>
</li>
<li
class
=
"alt"
><span> { </span></li>
<li
class
=
""
><span>
$data
[
$k1
][
$k2
] =
stripslashes
(
$v2
); </span></li>
<li
class
=
"alt"
><span> } </span></li>
<li
class
=
""
><span> } </span></li>
<li
class
=
"alt"
><span>
else
</span></li>
<li
class
=
""
><span> { </span></li>
<li
class
=
"alt"
><span>
$data
[
$k1
] =
stripslashes
(
$v1
); </span></li>
<li
class
=
""
><span> } </span></li>
<li
class
=
"alt"
><span> } </span></li>
<li
class
=
""
><span> } </span></li>
<li
class
=
"alt"
><span>
else
</span></li>
<li
class
=
""
><span> { </span></li>
<li
class
=
"alt"
>
<span> $</span><span
class
=
"attribute"
><font color=
"#ff0000"
>data</font></span><span> = </span><span
class
=
"attribute-value"
><font color=
"#0000ff"
>
stripslashes
</font></span><span>(
$data
); </span>
</li>
<li
class
=
""
><span> } </span></li>
<li
class
=
"alt"
><span> Return
$data
; </span></li>
<li
class
=
""
><span> } </span></li>
<li
class
=
"alt"
><span> </span></li>
<li
class
=
""
><span>
<li
class
=
"alt"
><span>
<li
class
=
""
><span>
function
data_show(&
$data
) </span></li>
<li
class
=
"alt"
><span> { </span></li>
<li
class
=
""
><span> </span></li>
<li
class
=
"alt"
><span>
if
(
is_array
(
$data
)) </span></li>
<li
class
=
""
><span> { </span></li>
<li
class
=
"alt"
>
<span>
foreach
(
$data
as
$</span><span
class
=
"attribute"
><font color=
"#ff0000"
>k1</font></span><span> =</span><span
class
=
"tag"
><strong><font color=
"#006699"
>></font></strong></span><span>
$v1
) </span>
</li>
<li
class
=
""
><span> { </span></li>
<li
class
=
"alt"
><span>
if
(
is_array
(
$v1
)) </span></li>
<li
class
=
""
><span> { </span></li>
<li
class
=
"alt"
>
<span>
foreach
(
$v1
as
$</span><span
class
=
"attribute"
><font color=
"#ff0000"
>k2</font></span><span> =</span><span
class
=
"tag"
><strong><font color=
"#006699"
>></font></strong></span><span>
$v2
) </span>
</li>
<li
class
=
""
><span> { </span></li>
<li
class
=
"alt"
><span>
$data
[
$k1
][
$k2
]=
nl2br
(htmlspecialchars(
$data
[
$k1
][
$k2
])); </span></li>
<li
class
=
""
><span>
$data
[
$k1
][
$k2
]=
str_replace
(
" "
,
" "
,
$data
[
$k1
][
$k2
]); </span></li>
<li
class
=
"alt"
>
<span>
$data
[
$k1
][
$k2
]=
str_replace
(
" "
,
"</span><strong><font color="
#006699
"><span class="
tag
"><</SPAN><SPAN class=tag-name>br</SPAN><SPAN class=tag>></span></font></strong><span> "
,
$data
[
$k1
][
$k2
]); </span>
</li>
<li
class
=
""
><span> } </span></li>
<li
class
=
"alt"
><span> } </span></li>
<li
class
=
""
><span>
else
</span></li>
<li
class
=
"alt"
><span> { </span></li>
<li
class
=
""
><span>
$data
[
$k1
]=
nl2br
(htmlspecialchars(
$data
[
$k1
])); </span></li>
<li
class
=
"alt"
><span>
$data
[
$k1
]=
str_replace
(
" "
,
" "
,
$data
[
$k1
]); </span></li>
<li
class
=
""
>
<span>
$data
[
$k1
]=
str_replace
(
" "
,
"</span><strong><font color="
#006699
"><span class="
tag
"><</SPAN><SPAN class=tag-name>br</SPAN><SPAN class=tag>></span></font></strong><span> "
,
$data
[
$k1
]); </span>
</li>
<li
class
=
"alt"
><span> } </span></li>
<li
class
=
""
><span> } </span></li>
<li
class
=
"alt"
><span> } </span></li>
<li
class
=
""
><span>
else
</span></li>
<li
class
=
"alt"
><span> { </span></li>
<li
class
=
""
>
<span> $</span><span
class
=
"attribute"
><font color=
"#ff0000"
>data</font></span><span>=</span><span
class
=
"attribute-value"
><font color=
"#0000ff"
>
nl2br
</font></span><span>(htmlspecialchars(
$data
)); </span>
</li>
<li
class
=
"alt"
>
<span> $</span><span
class
=
"attribute"
><font color=
"#ff0000"
>data</font></span><span>=</span><span
class
=
"attribute-value"
><font color=
"#0000ff"
>
str_replace
</font></span><span>(
" "
,
" "
,
$data
); </span>
</li>
<li
class
=
""
>
<span> $</span><span
class
=
"attribute"
><font color=
"#ff0000"
>data</font></span><span>=</span><span
class
=
"attribute-value"
><font color=
"#0000ff"
>
str_replace
</font></span><span>(
" "
,
"</span><strong><font color="
#006699
"><span class="
tag
"><</SPAN><SPAN class=tag-name>br</SPAN><SPAN class=tag>></span></font></strong><span> "
,
$data
); </span>
</li>
<li
class
=
"alt"
><span> } </span></li>
<li
class
=
""
><span> Return
$data
; </span></li>
<li
class
=
"alt"
><span> } </span></li>
<li
class
=
""
><span>} </span></li>
<li
class
=
"alt"
><span>
if
(
is_array
(
$data
)) </span></li>
<li
class
=
""
><span>{ </span></li>
<li
class
=
"alt"
>
<span>
foreach
(
$data
as
$</span><span
class
=
"attribute"
><font color=
"#ff0000"
>k1</font></span><span> =</span><span
class
=
"tag"
><strong><font color=
"#006699"
>></font></strong></span><span>
$v1
) </span>
</li>
<li
class
=
""
><span> { </span></li>
<li
class
=
"alt"
><span>
if
(
is_array
(
$v1
)) </span></li>
<li
class
=
""
><span> { </span></li>
<li
class
=
"alt"
>
<span>
foreach
(
$v1
as
$</span><span
class
=
"attribute"
><font color=
"#ff0000"
>k2</font></span><span> =</span><span
class
=
"tag"
><strong><font color=
"#006699"
>></font></strong></span><span>
$v2
) </span>
</li>
<li
class
=
""
><span> { </span></li>
<li
class
=
"alt"
><span>
$data
[
$k1
][
$k2
]=
nl2br
(htmlspecialchars(
$data
[
$k1
][
$k2
])); </span></li>
<li
class
=
""
><span>
$data
[
$k1
][
$k2
]=
str_replace
(
" "
,
" "
,
$data
[
$k1
][
$k2
]); </span></li>
<li
class
=
"alt"
>
<span>
$data
[
$k1
][
$k2
]=
str_replace
(
" "
,
"</span><strong><font color="
#006699
"><span class="
tag
"><</SPAN><SPAN class=tag-name>br</SPAN><SPAN class=tag>></span></font></strong><span> "
,
$data
[
$k1
][
$k2
]); </span>
</li>
<li
class
=
""
><span> } </span></li>
<li
class
=
"alt"
><span> } </span></li>
<li
class
=
""
><span>
else
</span></li>
<li
class
=
"alt"
><span> { </span></li>
<li
class
=
""
><span>
$data
[
$k1
]=
nl2br
(htmlspecialchars(
$data
[
$k1
])); </span></li>
<li
class
=
"alt"
><span>
$data
[
$k1
]=
str_replace
(
" "
,
" "
,
$data
[
$k1
]); </span></li>
<li
class
=
""
>
<span>
$data
[
$k1
]=
str_replace
(
" "
,
"</span><strong><font color="
#006699
"><span class="
tag
"><</SPAN><SPAN class=tag-name>br</SPAN><SPAN class=tag>></span></font></strong><span> "
,
$data
[
$k1
]); </span>
</li>
<li
class
=
"alt"
><span> } </span></li>
<li
class
=
""
><span> } </span></li>
<li
class
=
"alt"
><span>} </span></li>
<li
class
=
""
><span>
else
</span></li>
<li
class
=
"alt"
><span>{ </span></li>
<li
class
=
""
>
<span> $</span><span
class
=
"attribute"
><font color=
"#ff0000"
>data</font></span><span>=</span><span
class
=
"attribute-value"
><font color=
"#0000ff"
>
nl2br
</font></span><span>(htmlspecialchars(
$data
)); </span>
</li>
<li
class
=
"alt"
>
<span> $</span><span
class
=
"attribute"
><font color=
"#ff0000"
>data</font></span><span>=</span><span
class
=
"attribute-value"
><font color=
"#0000ff"
>
str_replace
</font></span><span>(
" "
,
" "
,
$data
); </span>
</li>
<li
class
=
""
>
<span> $</span><span
class
=
"attribute"
><font color=
"#ff0000"
>data</font></span><span>=</span><span
class
=
"attribute-value"
><font color=
"#0000ff"
>
str_replace
</font></span><span>(
" "
,
"</span><strong><font color="
#006699
"><span class="
tag
"><</SPAN><SPAN class=tag-name>br</SPAN><SPAN class=tag>></span></font></strong><span> "
,
$data
); </span>
</li>
<li
class
=
"alt"
><span>} </span></li>
<li
class
=
""
><span>Return
$data
; </span></li>
<li
class
=
"alt"
><span>} </span></li>
<li
class
=
""
><span>} </span></li>
<li
class
=
"alt"
>
<span></span><span
class
=
"tag"
><strong><font color=
"#006699"
>?></font></strong></span><span> </span>
</li>
</ol>