골

제로보드코딩을 그누보드로 바꾸고져 합니다.

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 :

<?PHP
if (!$mode) $mode = $_POST['mode'];
if (!$no) $no = $_POST['no'];
if (!$id) $id = $_POST['id'];
$parent = 0 - $no;
$do_poll = $_POST['do_poll']; //투표작성 여부
$pollReset = $_POST['pollReset']; //투표 새로작성 여부
$pollAnswers = $_POST['pollAnswers'];
$pollOptions = $_POST['pollOptions'];
if ($_POST['multiPoll'] == 1) $password = $_POST['multiPollNo']; else $password = "noMultiPoll"; //다중투표 허용 & 갯수
if ($_POST['PollTime'] < 1) $_POST['PollTime'] = 30;
$reg_date = strtotime("+".$_POST['PollTime']." days"); //투표 기간
$REMOTE_ADDR = $_POST['allowRePoll']; //재투표 허용 여부
//$REMOTE_ADDR = $_SERVER['REMOTE_ADDR']; //아이피
$re_poll = $_POST['re_poll']; //재투표 여부

//글쓰기 관련
//수정
if($mode == "modify" && $no) {
$pollCnt = 0;
if ($do_poll != "1") {
@mysql_query("delete from $t_comment"."_$id where parent='$parent'");
}
if ($pollReset == "1") {
@mysql_query("delete from $t_comment"."_$id where parent='$parent'");

$name = "pollOption";
for ($i=0; $i<count($pollOptions); $i++) {
if ($pollOptions[$i] != "") {
$memo = del_html($pollOptions[$i]);
//투표항목 입력
@mysql_query("insert into $t_comment"."_$id (parent,ismember,name,password,memo,reg_date,ip) values ('$parent','$member[no]','$name','$password','$memo','$reg_date','$REMOTE_ADDR')");
$pollCnt ++;
}
}

if($pollCnt == 0) {
$do_poll = '';
}
} else {
@mysql_query(" update $t_comment"."_$id set ip='$REMOTE_ADDR', reg_date='$reg_date', password='$password' where parent='$parent' and name='pollOption' ");
}

@mysql_query("update $t_board"."_$id set poll='$do_poll' where no='$no'");

//답변 or 새글
} elseif(($mode == "reply" || $mode == "write") && $do_poll == "1") {

$pollCnt = 0;
$name = "pollOption";
for ($i=0; $i<count($pollOptions); $i++) {
if ($pollOptions[$i] != "") {
$memo = del_html($pollOptions[$i]);
//투표항목 입력
@mysql_query("insert into $t_comment"."_$id (parent,ismember,name,password,memo,reg_date,ip) values ('$parent','$member[no]','$name','$password','$memo','$reg_date','$REMOTE_ADDR')");
$pollCnt ++;
}
}

if($pollCnt == 0) {
$do_poll = '';
}

@mysql_query("update $t_board"."_$id set poll='$do_poll' where no='$no'");

//////투표관련
} elseif($mode == "poll" && $no > 0 && $id != "") {

include "lib.php"; // 라이브러리 함수 파일 인크루드
if(!$connect) $connect=dbConn(); // DB 연결
$member=member_info(); // 멤버정보 구하기
$REMOTE_ADDR = $_SERVER['REMOTE_ADDR']; //아이피

$pollChkTmp = @mysql_fetch_row(mysql_query("select no from $t_comment"."_$id where parent='$parent' and name='pollAnswer' and ((ismember='$member[no]' and password='$member[name]') or (ip='$REMOTE_ADDR')) limit 1"));
$pollChk = $pollChkTmp[0];

//중복투표 체크
if ($pollChk && $re_poll != "1") {
head();
echo "<script>alert('이미 투표 하셨습니다');</script>";
foot();
exit;
}

if (count($pollAnswers) > 0) {
$name = "pollAnswer";
$reg_date = time();
$password = $member['name'];
for ($i=0; $i<count($pollAnswers); $i++) {
if ($pollAnswers[$i] != "") {
//투표결과 입력
$memo = $pollAnswers[$i];
@mysql_query("insert into $t_comment"."_$id (parent,ismember,name,password,memo,reg_date,ip) values ('$parent','$member[no]','$name','$password','$memo','$reg_date','$REMOTE_ADDR')");
}
}

if($member[no]) {
$name = addslashes($member[name]);
$password = addslashes($member[password]);
} else {
$name = '방문객';
$password = mt_rand();
}
$memo = addslashes("$name"."님이 설문에 참여하셨습니다!");
@mysql_query("insert into $t_comment"."_$id (parent,ismember,name,password,memo,reg_date,ip) values ('$no','$member[no]','$name','$password','$memo','$reg_date','poll_msg')");
$total=mysql_fetch_array(mysql_query("select count(*) from $t_comment"."_$id where parent='$no'"));
@mysql_query("update $t_board"."_$id set total_comment='$total[0]' where no='$no'");

} else {
// 재투표!! [회원전용 기능]
if ($re_poll == "1") {
@mysql_query("delete from $t_comment"."_$id where parent='$parent' and name='pollAnswer' and ismember='$member[no]' and password='$member[name]'");
@mysql_query("delete from $t_comment"."_$id where parent='$no' and name='$member[name]' and ismember='$member[no]' and password='$member[password]' and ip='poll_msg'");
$total=mysql_fetch_array(mysql_query("select count(*) from $t_comment"."_$id where parent='$no'"));
@mysql_query("update $t_board"."_$id set total_comment='$total[0]' where no='$no'");
}
}
echo "<script>parent.location.replace(parent.document.location.href);</script>";
}
?>

http://www.alik.info/gnu/bbs/board.php?bo_table=alik&wr_id=275&page=2
위 링크에 나온것입니다.

그런데 제로보드는 자동으로 리플이 달리는데 그누보드는 위코드를 어떻게 바꿔야 적용이 되나요?

댓글 1개

제로보드 스타일의 코드네요...
그누와 제로는 프로그램 언어는 같지만.. 구조는 다르다고 보시면 됩니다.

즉, 같은 종류인 자동차를 예를 들자면... 에쿠스에 티코 타이어를 설치할수는 없겠죠?
그누에 맞게 새로 프로그램을 만들어야 합니다...
댓글을 작성하시려면 로그인이 필요합니다.

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
09-03-12 조회 1,057
09-03-12 조회 1,776
09-03-12 조회 1,686
09-03-12 조회 1,860
09-03-12 조회 880
09-03-12 조회 1,047
09-03-12 조회 802
09-03-12 조회 1,086
09-03-12 조회 1,744
09-03-12 조회 1,140
09-03-12 조회 1,623
09-03-12 조회 1,153
09-03-12 조회 897
09-03-12 조회 1,059
09-03-12 조회 1,015
09-03-12 조회 911
09-03-11 조회 963
09-03-11 조회 838
09-03-11 조회 1,628
09-03-11 조회 1,049