제로소스를 그누소스로 변경 어떻게 하면 되나요? > 질문답변

본문 바로가기
사이트 내 전체검색

질문답변

서버정보나 계정정보는 보안유지를 위해 관리자쪽지나 메일로 발송해 주시거나 제작의뢰 게시판을 이용해 주시면 감사하겠습니다..

제로소스를 그누소스로 변경 어떻게 하면 되나요?

페이지 정보

본문

<?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
위 링크에 나온것입니다.

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

댓글목록

profile_image

제로님의 댓글

제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일
profile_image

골든님의 댓글

골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

일반 투표하는것과 똑같은듯 한데요

제가 질문드리고자 하는것은 내용에 투표넣기가 아니라 이미 투표넣기를 했습니다.
또한 관리자만이 투표결과를 보게 한 것이고요
문제는 모든 회원들에게 투표하라고 했지만 일부만 했다면 투표를 하지 않는사람에게 다시 투표를 하라고 알려드리고져 투표한사람과 투표를 하지 않는사람을 구분하기 위해서 최고관리자만이 관리자페이지에서 보여주고 싶은것입니다.
그리고 위 소스는 투표를 하면 리플이 자동으로 투표자이름으로 달리는 기능인데 위 소스는 안타깝께도 제로보드에서 사용하는 소스입니다.
위 소스를 그누보드에 맞께 변경을 하기 위해서는 테이블명이 모두 달라야하고 커리문 또한 달라야 하지 않겠는가 하는 생각에서 어디를 어떻게 수정을 해야 그누에 맞께 사용할 수 있는가의 질문입니다.

에공 넘 어려버요...

Total 34건 1 페이지
  • RSS
질문답변 목록
번호 제목 글쓴이 조회 추천 날짜
34 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6612 0 06-20
33 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6660 0 06-18
32 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 10167 0 06-17
31 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9161 0 06-17
30 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13637 0 06-15
29 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8961 1 06-15
28 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7899 0 06-15
27 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6957 0 06-12
26 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12741 0 06-11
25 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 10369 0 03-24
24 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9031 0 03-16
열람중 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9908 0 03-11
22 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6867 0 03-11
21 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8916 0 11-10
20 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7283 0 11-09
19 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 10069 0 11-09
18 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7610 0 11-04
17 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7710 0 11-03
16 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8208 0 10-31
15 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11215 0 10-29
14 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11366 0 10-28
13 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9118 0 10-27
12 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7792 0 10-25
11 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6411 0 10-14
10 골든쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6167 0 10-10

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
3,101
어제
5,052
최대
7,259
전체
1,302,460
Copyright (c) 株式会社YHPLUS. All rights reserved.