묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
회원가입시나 수정시 닉네임/ID /E-mail 은 중복체크를 하자나요 . 이름도 가능할까요?
2005.07.15 05:40
회원가입시나 수정시 닉네임/ID /E-mail 은 중복체크를 하자나요 . 이름도 가능할까요?
$lang->msg_exists_nick_name = \
제로보드 프로그램을 아래와 같이 수정하세요. 단, 테스트가 완벽하지 않으니 문제 발생시 알려주세요.
또한, 이경우 모든 게시판에 대해 비밀글이 리스트에 안나옵니다.
--- zboard.php 15 Dec 2003 12:35:53 -0000 1.2
+++ zboard.php 19 Jul 2005 14:29:15 -0000
@@ -12,11 +12,18 @@
// 사용권한 체크
if($setup[grant_list]<$member[level] && !$is_admin) Error("사용권한이 없습니다","login.php?id=$id&page=$page&category=$category&sn=$ sn&ss=$ss&sc=$sc&keyword=$keyword&no=$no&s_url=".urlencode($REQUEST_URI));
+ if($setup[grant_view_secret]<$member[level] && !$is_admin)
+ $view_secret=0;
+ else
+ $view_secret=1;
// 검색조건이 있을때 : 상황 -> 카테고리 선택, Use_Showreply 사용, 또는 검색어로 검색을 할때
if($s_que) {
$_dbTimeStart = getmicrotime();
- $que="select * from $t_board"."_$id $s_que order by $select_arrange $desc limit $start_num, $page_num";
+ if($view_secret)
+ $que="select * from $t_board"."_$id $s_que order by $select_arrange $desc limit $start_num, $page_num";
+ else
+ $que="select * from $t_board"."_$id $s_que and is_secret=0 order by $select_arrange $desc limit $start_num, $page_num";
$result=mysql_query($que,$connect) or Error(mysql_error());
$_dbTime += getmicrotime()-$_dbTimeStart;
}
@@ -33,7 +40,10 @@
if($sum>=$start_num) {
$start_num=$start_num-($sum-$division_data[num]);
$_dbTimeStart = getmicrotime();
- $que="select * from $t_board"."_$id where division='$division' and headnum<0 order by headnum,arrangenum limit $start_num, $page_num";
+ if($view_secret)
+ $que="select * from $t_board"."_$id where division='$division' and headnum<0 order by headnum,arrangenum limit $start_num, $page_num";
+ else
+ $que="select * from $t_board"."_$id where division='$division' and headnum<0 and is_secret=0 order by headnum,arrangenum limit $start_num, $page_num";
$result=mysql_query($que) or error(mysql_error());
$_dbTime += getmicrotime()-$_dbTimeStart;
$check1=1;
@@ -47,7 +57,10 @@
$division--;
$minus=$page_num-$returnNum;
$_dbTimeStart = getmicrotime();
- $que2="select * from $t_board"."_$id where division=$division and headnum!=0 order by headnum,arrangenum limit $minus";
+ if($view_secret)
+ $que2="select * from $t_board"."_$id where division=$division and headnum!=0 order by headnum,arrangenum limit $minus";
+ else
+ $que2="select * from $t_board"."_$id where division=$division and headnum!=0 and is_secret=0 order by headnum,arrangenum limit $minus";
$result2=mysql_query($que2) or error(mysql_error());
$_dbTime += getmicrotime()-$_dbTimeStart;
$check2=1;
@@ -60,7 +73,10 @@
// 검색조건은 없지만 정렬값이 생길때;;; //////////////////////////////
else {
- $que="select * from $t_board"."_$id $s_que order by $select_arrange $desc $add_on limit $start_num, $page_num";
+ if($view_secret)
+ $que="select * from $t_board"."_$id order by $select_arrange $desc $add_on limit $start_num, $page_num";
+ else
+ $que="select * from $t_board"."_$id where is_secret=0 order by $select_arrange $desc $add_on limit $start_num, $page_num";
$_dbTimeStart = getmicrotime();
$result=mysql_query($que,$connect) or Error(mysql_error());
$_dbTime += getmicrotime()-$_dbTimeStart;