zb4, www.nzeo.com의 팁공유 페이지를 둘러보다보니

'복권'이라는 게시글을 발견했습니다.

<?
$_zb_path = "/절대경로/";  //제로보드의 절대경로 입력
include $_zb_path."_head.php";  // 그냥 나두세요.

function Msg( $msg ) {
echo "<script>
alert('$msg');
</script>";
}

$num1 = rand("1","30");
$num2 = rand("1","30");
$num3 = rand("1","30");

?>
<?

if($member[no]&&$member[point1] > 20) {

@mysql_query("update $member_table set point1=point1-20 where no='$member[no]'",$connect) or error(mysql_error());

if($member[point1] < 0)  

// 포인트가 부족할경우 사용못함
@mysql_query("update $member_table set point1=0 where no='$member[no]'",$connect) or error(mysql_error());

?>

<input type=button value="<?=$num1?>" style="border:1 solid black; background:white; width:100;">
<input type=button value="<?=$num2?>" style="border:1 solid black; background:white; width:100;">
<input type=button value="<?=$num3?>" style="border:1 solid black; background:white; width:100;">

<?
if($num1==$num2&&$num2==$num3&&$num2==$num3) {
        Msg('축하합니다 3개 모두 맞으셨습니다');
        @mysql_query("update $member_table set point1=point1+800 where no='$member[no]'",$connect) or error(mysql_error());
} elseif($num1==$num2||$num2==$num3||$num1==$num3) {
        Msg('축하합니다. 2개 맞으셨습니다');
        @mysql_query("update $member_table set point1=point1+500 where no='$member[no]'",$connect) or error(mysql_error());
} else {
        Msg('복권당첨 결과 = 꽝입니다.');
}

} else {
Msg('복권 못긁어요-ㅁ-');
}
?>

<p>                              <a href="bokgun.php">[다시 하기]</a>
</p>


이런 소스가 있던데요..

이걸 zb5에서 구현하려면 어떤 방법을 사용해야 하죠?


메모장으로 .php나 .js파일 수정시 깨져서 나오기에 아크로에딧을 사용하고 있습니다.