묻고답하기
[화면캡쳐 + 소스] 제로보드4 갤러리 게시판 질문드려요
2017.10.27 13:12
개요: 갤러리 게시판에서 수정으로 사진변경하고 확인 누르면 내용보기 화면이 나오게 하기
(현재는 리스트 화면으로 넘어가 버려요..ㅠ)
안녕하세요
홈페이지 주소 : http://ykj2017.godohosting.com
현재 사용되고 있는 갤러리 게시판은 첨부파일이 10개까지 올릴수 있도록 작업완료 된 상태에요..
그런데 수정하고 싶은 사항이 있어 문의 드려요
제로보드 4 . 갤러리게시판에서 첨부파일 올리고
수정 버튼 클릭하고 사진을 추가 또는 변경한 후에
확인 버튼 누르면... 리스트(미리보기 있는 첫 화면) 화면으로 넘어가요 ㅠ
일반적으로는 수정하고 확인 누르면 내용보기(수정한 사진이 바로 나왔는지 바로 확인함) 화면이 나오는데..
현재 갤러리 게시판에서는 리스트 화면으로 넘어가요..
수정 버튼 클릭한 후에 수정하고 확인 누르면.. 내용보기 화면으로 넘어가도록 할려면 어떻게 수정해야 되는지요?..ㅠ
조언 좀 부탁드려요..
아래 소스는 해당 갤러리 스킨의 write.php 소스에요
-------------------------------------------------------------------------
<? if($mode=="reply") $title="답 / 글 / 쓰 / 기";
else if($mode=="modify") $title="글 / 수 / 정";
else $title="새 / 글 / 쓰 / 기";
?>
< table border="0" cellspacing="0" cellpadding="0" width="<?=$width?>">
<form method=post name=write action=write_ok.php onsubmit="return check_submit();" enctype=multipart/form-data><input type=hidden name=page value=<?=$page?>><input type=hidden name=id value=<?=$id?>><input type=hidden name=no value=<?=$no?>><input type=hidden name=select_arrange value=<?=$select_arrange?>><input type=hidden name=desc value=<?=$desc?>><input type=hidden name=page_num value=<?=$page_num?>><input type=hidden name=keyword value="<?=$keyword?>"><input type=hidden name=category value="<?=$category?>"><input type=hidden name=sn value="<?=$sn?>"><input type=hidden name=ss value="<?=$ss?>"><input type=hidden name=sc value="<?=$sc?>"><input type=hidden name=mode value="<?=$mode?>">
<tr><td class="board_top"><?=$title?></td></tr>
< /table>
< table border="0" cellspacing="0" cellpadding="0" class="background" style="word-break:break-all;margin:10 0 0 0" width="<?=$width?>">
<col width="95" align=right></col><col width=></col>
<?=$hide_start?>
<tr><td class="daerew"><font color="000000">글작성자 </font></td>
<td class="daerew" style="padding-bottom:3"><input type=text name=name value="<?=$name?>" <?=size(15)?> maxlength=10 class="daerew_input" style=width:30%></td>
</tr>
<tr><td class="daerew"><font color="000000">비밀번호 </font></td>
<td class="daerew" style='padding-bottom:3'><input type=password name=password <?=size(12)?> maxlength=20 class="daerew_input" style=width:30%></td>
</tr>
<tr><td class="daerew">전자우편 </td>
<td class="daerew" style="padding-bottom:3"><input type=text name=email value="<?=$email?>" <?=size(67)?> maxlength=200 class="daerew_input" style=width:80%></td>
</tr>
<tr><td class="daerew">웹사이트 </td>
<td class="daerew" style="padding-bottom:3"><input type=text name=homepage value="<?=$homepage?>" <?=size(67)?> maxlength=200 class="daerew_input" style=width:80%></td>
</tr>
<?=$hide_end?>
<tr><td class="daerew"><font color="#EF5900">제 목 </font></td>
<td class="daerew" style="padding-right:20;padding-bottom:3"><input type=text name=subject value="<?=$subject?>" <?=size(67)?> maxlength=200 class="daerew_input" style=width:100%></td>
</tr>
<tr><td class="daerew">옵 션 </td>
<td class="daerew_s" style="padding-bottom:3">
<?=$category_kind?><?=$hide_notice_start?><input type=checkbox name=notice <?=$notice?> value=1> 공지<?=$hide_notice_end?>
<?=$hide_html_start?><input type=checkbox name=use_html <?=$use_html?> value=1> 태그사용<?=$hide_html_end?>
<input type=checkbox name=reply_mail <?=$reply_mail?> value=1> 답변글메일로받기<?=$hide_secret_start?>
<input type=checkbox name=is_secret <?=$secret?> value=1> 비밀글<?=$hide_secret_end?>
</td>
</tr>
<tr><td class="daerew" onclick="document.write.memo.rows=document.write.memo.rows+3" style=cursor:hand title='클릭하시면 내용 쓰는 공간이 늘어납니다'>내 용 <br><br>▼ </td>
<td class="daerew" style='padding-right:20;padding-bottom:3'><textarea name=memo <?=size2(72)?> rows=15 class="daerew_textarea" style=width:100%><? $memo = str_replace( "<", "<", $memo ); $memo = str_replace( "<", ">", $memo ); echo $memo; ?></textarea></td>
</tr>
<?=$hide_sitelink1_start?>
<tr><td class="daerew">링크 #01 </td>
<td class="daerew" style="padding-right:20;padding-bottom:3"><input type=text name=sitelink1 value="<?=$sitelink1?>" <?=size(73)?> maxlength=200 class="daerew_input" style=width:100%></td>
</tr>
<?=$hide_sitelink1_end?>
<?=$hide_sitelink2_start?>
<tr><td class="daerew">링크 #02 </td>
<td class="daerew" style="padding-right:20;padding-bottom:3"><input type=text name=sitelink2 value="<?=$sitelink2?>" <?=size(73)?> maxlength=200 class="daerew_input" style=width:100%></td>
</tr>
<?=$hide_sitelink2_end?>
<?=$hide_pds_start?>
<tr>
<td class="daerew" valign=top style='padding-top:3'>파일 #01 </td>
<td class="daerew" style="padding-right:20;padding-bottom:3"><input type=file name=file1 <?=size(30)?> maxlength=255 class="daerew_input" style=width:100%><?=$file_name1?></td>
</tr>
<tr>
<td class="daerew" valign=top style='padding-top:3'>파일 #02 </td>
<td class="daerew" style="padding-right:20;padding-bottom:3"><input type=file name=file2 <?=size(58)?> maxlength=255 class="daerew_input" style=width:100%><?=$file_name2?></td>
</tr>
<tr>
<td class="daerew" valign=top style='padding-top:3'>파일 #03 </td>
<td class="daerew" style="padding-right:20;padding-bottom:3"><input type=file name=file3 <?=size(58)?> maxlength=255 class="daerew_input" style=width:100%><?=$file_name3?></td>
</tr>
<tr>
<td class="daerew" valign=top style='padding-top:3'>파일 #04 </td>
<td class="daerew" style="padding-right:20;padding-bottom:3"><input type=file name=file4 <?=size(58)?> maxlength=255 class="daerew_input" style=width:100%><?=$file_name4?></td>
</tr>
<tr>
<td class="daerew" valign=top style='padding-top:3'>파일 #05 </td>
<td class="daerew" style="padding-right:20;padding-bottom:3"><input type=file name=file5 <?=size(58)?> maxlength=255 class="daerew_input" style=width:100%><?=$file_name5?></td>
</tr>
<tr>
<td class="daerew" valign=top style='padding-top:3'>파일 #06 </td>
<td class="daerew" style="padding-right:20;padding-bottom:3"><input type=file name=file6 <?=size(58)?> maxlength=255 class="daerew_input" style=width:100%><?=$file_name6?></td>
</tr>
<tr>
<td class="daerew" valign=top style='padding-top:3'>파일 #07 </td>
<td class="daerew" style="padding-right:20;padding-bottom:3"><input type=file name=file7 <?=size(58)?> maxlength=255 class="daerew_input" style=width:100%><?=$file_name7?></td>
</tr>
<tr>
<td class="daerew" valign=top style='padding-top:3'>파일 #08 </td>
<td class="daerew" style="padding-right:20;padding-bottom:3"><input type=file name=file8 <?=size(58)?> maxlength=255 class="daerew_input" style=width:100%><?=$file_name8?></td>
</tr>
<tr>
<td class="daerew" valign=top style='padding-top:3'>파일 #09 </td>
<td class="daerew" style="padding-right:20;padding-bottom:3"><input type=file name=file9 <?=size(58)?> maxlength=255 class="daerew_input" style=width:100%><?=$file_name9?></td>
</tr>
<tr>
<td class="daerew" valign=top style='padding-top:3'>파일 #10 </td>
<td class="daerew" style="padding-right:20;padding-bottom:3"><input type=file name=file10 <?=size(58)?> maxlength=255 class="daerew_input" style=width:100%><?=$file_name10?></td>
</tr>
<?=$hide_pds_end?>
< /table>
< table border="0" cellspacing="0" cellpadding="0" width="<?=$width?>">
<tr align="center" height="35">
<td align="left"><?=$a_preview?><img src=<?=$dir?>/images/preview.gif border=0></a> <?=$a_imagebox?><img src=<?=$dir?>/images/imagebox.gif border=0></a></td>
<td align="right"><input accesskey="s" type=image border=0 align=absmiddle src=<?=$dir?>/images/confirm.gif> <img src=<?=$dir?>/images/back.gif align=absmiddle border=0 onclick=history.go(-1) style=cursor:hand></td>
</tr>
< /table>
----------- 그리고 아래 소스는 bbs/write_ok.php 소스에요..----------------------
<?
//set_time_limit(0);
/*************************************************
* 공통 파일 include
*************************************************/
include "_head.php";
// 자동등록방지 검사
include "norobot/norobot_check.inc.php";
/**************************************************
* 게시판 설정 체크
*************************************************/
// 편법을 이용한 글쓰기 방지
$mode = $HTTP_POST_VARS[mode];
if(!eregi($HTTP_HOST,$HTTP_REFERER)) Error("정상적으로 글을 작성하여 주시기 바랍니다.");
if(getenv("REQUEST_METHOD") == 'GET' ) Error("정상적으로 글을 쓰시기 바랍니다","");
if(!$mode) $mode = "write";
// 사용권한 체크
if($mode=="reply"&&$setup[grant_reply]<$member[level]&&!$is_admin) Error("사용권한이 없습니다","login.php?id=$id&page=$page&page_num=$page_num&category=$category&sn=$sn&ss=$ss&sc=$sc&keyword=$keyword&no=$no&file=zboard.php");
elseif($setup[grant_write]<$member[level]&&!$is_admin) Error("사용권한이 없습니다","login.php?id=$id&page=$page&page_num=$page_num&category=$category&sn=$sn&ss=$ss&sc=$sc&keyword=$keyword&no=$no&file=zboard.php");
if(!$is_admin&&$setup[grant_notice]<$member[level]) $notice = 0;
// 각종 변수 검사;;
if(!$member[no]) {
if(isblank($name)) Error("이름을 입력하셔야 합니다");
if(isblank($password)) Error("비밀번호를 입력하셔야 합니다");
} else {
$password = $member[password];
}
$subject = str_replace("","",$subject);
$memo = str_replace("","",$memo);
$name = str_replace("","",$name);
if(isblank($subject)) Error("제목을 입력하셔야 합니다");
if(isblank($memo)) Error("내용을 입력하셔야 합니다");
if(!$category) {
$cate_temp=mysql_fetch_array(mysql_query("select min(no) from $t_category"."_$id",$connect));
$category=$cate_temp[0];
}
// 필터링;; 관리자가 아닐때;;
if(!$is_admin&&$setup[use_filter]) {
$filter=explode(",",$setup[filter]);
$f_memo=eregi_replace("([\_\-\./~@?=%&! ]+)","",strip_tags($memo));
$f_name=eregi_replace("([\_\-\./~@?=%&! ]+)","",strip_tags($name));
$f_subject=eregi_replace("([\_\-\./~@?=%&! ]+)","",strip_tags($subject));
$f_email=eregi_replace("([\_\-\./~@?=%&! ]+)","",strip_tags($email));
$f_homepage=eregi_replace("([\_\-\./~@?=%&! ]+)","",strip_tags($homepage));
for($i=0;$i<count($filter);$i++) {
if(!isblank($filter[$i])) {
if(eregi($filter[$i],$f_memo)) Error("<b>$filter[$i]</b> 은(는) 등록하기에 적합한 단어가 아닙니다");
if(eregi($filter[$i],$f_name)) Error("<b>$filter[$i]</b> 은(는) 등록하기에 적합한 단어가 아닙니다");
if(eregi($filter[$i],$f_subject)) Error("<b>$filter[$i]</b> 은(는) 등록하기에 적합한 단어가 아닙니다");
if(eregi($filter[$i],$f_email)) Error("<b>$filter[$i]</b> 은(는) 등록하기에 적합한 단어가 아닙니다");
if(eregi($filter[$i],$f_homepage)) Error("<b>$filter[$i]</b> 은(는) 등록하기에 적합한 단어가 아닙니다");
}
}
}
//패스워드를 암호화
if(strlen($password)) {
$temp=mysql_fetch_array(mysql_query("select password('$password')"));
$password=$temp[0];
}
// 관리자이거나 HTML허용레벨이 낮을때 태그의 금지유무를 체크
if(!$is_admin&&$setup[grant_html]<$member[level]) {
// 내용의 HTML 금지;;
if(!$use_html||$setup[use_html]==0) $memo=del_html($memo);
// HTML의 부분허용일때;;
if($use_html&&$setup[use_html]==1) {
$memo=str_replace("<","<",$memo);
$tag=explode(",",$setup[avoid_tag]);
for($i=0;$i<count($tag);$i++) {
if(!isblank($tag[$i])) {
$memo=eregi_replace("<".$tag[$i]." ","<".$tag[$i]." ",$memo);
$memo=eregi_replace("<".$tag[$i].">","<".$tag[$i].">",$memo);
$memo=eregi_replace("</".$tag[$i],"</".$tag[$i],$memo);
}
}
}
} else {
if(!$use_html) {
$memo=del_html($memo);
}
}
// 원본글을 가져옴
unset($s_data);
$s_data=mysql_fetch_array(mysql_query("select * from $t_board"."_$id where no='$no'"));
// 원본글을 이용한 비교
if($mode=="modify"||$mode=="reply") {
if(!$s_data[no]) Error("원본글이 존재하지 않습니다");
}
// 공지글에는 답글이 안 달리게 처리
if($mode=="reply"&&$s_data[headnum]<=-2000000000) Error("공지글에는 답글을 달수 없습니다");
// 회원등록이 되어 있을때 이름등을 가져옴;;
if($member[no]) {
if($mode=="modify"&&$member[no]!=$s_data[ismember]) {
$name=$s_data[name];
$email=$s_data[email];
$homepage=$s_data[homepage];
} else {
$name=$member[name];
$email=$member[email];
$homepage=$member[homepage];
}
}
// 각종 변수의 addslashes 시킴;;
$name=addslashes(del_html($name));
if(($is_admin||$member[level]<=$setup[use_html])&&$use_html) $subject=addslashes($subject);
else $subject=addslashes(del_html($subject));
$memo=addslashes($memo);
if($use_html<2) {
$memo=str_replace(" "," ",$memo);
$memo=str_replace("\t"," ",$memo);
}
$sitelink1=addslashes(del_html($sitelink1));
$sitelink2=addslashes(del_html($sitelink2));
$email=addslashes(del_html($email));
$homepage=addslashes(del_html($homepage));
// 홈페이지 주소의 경우 http:// 가 없으면 붙임
if((!eregi("http://",$homepage))&&$homepage) $homepage="http://".$homepage;
// 각종 변수 설정
$ip=$REMOTE_ADDR; // 아이피값 구함;;
$reg_date=time(); // 현재의 시간구함;;
$x = $zx;
$y = $zy;
// 도배인지 아닌지 검사;; 우선 같은 아이피대에 30초이내의 글은 도배로 간주;;
/*if(!$is_admin&&$mode!="modify") {
$max_no=mysql_fetch_array(mysql_query("select max(no) from $t_board"."_$id"));
$temp=mysql_fetch_array(mysql_query("select count(*) from $t_board"."_$id where ip='$ip' and $reg_date - reg_date <1 and no='$max_no[0]'"));
if($temp[0]>0) {Error("글등록은 30초이상이 지나야 가능합니다"); exit;}
}*/
// 같은 내용이 있는지 검사;;
// 쿠키 설정;;
if($mode!="modify") {
// 기존 세션 처리 (4.0x용 세션 처리로 인하여 주석 처리)
//if($name) $HTTP_SESSION_VARS["zb_writer_name"] = $name;
//if($email) $HTTP_SESSION_VARS["zb_writer_email"] = $email;
//if($homepage) $HTTP_SESSION_VARS["zb_writer_homepage"] = $homepage;
// 4.0x 용 세션 처리
if($name) {
$zb_writer_name = $name;
session_register("zb_writer_name");
}
if($email) {
$zb_writer_email = $email;
session_register("zb_writer_email");
}
if($homepage) {
$zb_writer_homepage = $homepage;
session_register("zb_writer_homepage");
}
}
/***************************************************************************
* 업로드가 있을때
**************************************************************************/
if($HTTP_POST_FILES[file1]) {
$file1 = $HTTP_POST_FILES[file1][tmp_name];
$file1_name = $HTTP_POST_FILES[file1][name];
$file1_size = $HTTP_POST_FILES[file1][size];
$file1_type = $HTTP_POST_FILES[file1][type];
}
if($HTTP_POST_FILES[file2]) {
$file2 = $HTTP_POST_FILES[file2][tmp_name];
$file2_name = $HTTP_POST_FILES[file2][name];
$file2_size = $HTTP_POST_FILES[file2][size];
$file2_type = $HTTP_POST_FILES[file2][type];
}
if($HTTP_POST_FILES[file3]) {
$file3 = $HTTP_POST_FILES[file3][tmp_name];
$file3_name = $HTTP_POST_FILES[file3][name];
$file3_size = $HTTP_POST_FILES[file3][size];
$file3_type = $HTTP_POST_FILES[file3][type];
}
if($HTTP_POST_FILES[file4]) {
$file4 = $HTTP_POST_FILES[file4][tmp_name];
$file4_name = $HTTP_POST_FILES[file4][name];
$file4_size = $HTTP_POST_FILES[file4][size];
$file4_type = $HTTP_POST_FILES[file4][type];
}
if($HTTP_POST_FILES[file5]) {
$file5 = $HTTP_POST_FILES[file5][tmp_name];
$file5_name = $HTTP_POST_FILES[file5][name];
$file5_size = $HTTP_POST_FILES[file5][size];
$file5_type = $HTTP_POST_FILES[file5][type];
}
if($HTTP_POST_FILES[file6]) {
$file6 = $HTTP_POST_FILES[file6][tmp_name];
$file6_name = $HTTP_POST_FILES[file6][name];
$file6_size = $HTTP_POST_FILES[file6][size];
$file6_type = $HTTP_POST_FILES[file6][type];
}
if($HTTP_POST_FILES[file7]) {
$file7 = $HTTP_POST_FILES[file7][tmp_name];
$file7_name = $HTTP_POST_FILES[file7][name];
$file7_size = $HTTP_POST_FILES[file7][size];
$file7_type = $HTTP_POST_FILES[file7][type];
}
if($HTTP_POST_FILES[file8]) {
$file8 = $HTTP_POST_FILES[file8][tmp_name];
$file8_name = $HTTP_POST_FILES[file8][name];
$file8_size = $HTTP_POST_FILES[file8][size];
$file8_type = $HTTP_POST_FILES[file8][type];
}
if($HTTP_POST_FILES[file9]) {
$file9 = $HTTP_POST_FILES[file9][tmp_name];
$file9_name = $HTTP_POST_FILES[file9][name];
$file9_size = $HTTP_POST_FILES[file9][size];
$file9_type = $HTTP_POST_FILES[file9][type];
}
if($HTTP_POST_FILES[file10]) {
$file10 = $HTTP_POST_FILES[file10][tmp_name];
$file10_name = $HTTP_POST_FILES[file10][name];
$file10_size = $HTTP_POST_FILES[file10][size];
$file10_type = $HTTP_POST_FILES[file10][type];
}
//추가 한글그림화일 이름 변경...
if($member[no]!=0) {
$user_no=$member[no];
$user_id_c=mysql_fetch_array(mysql_query("select user_id from $member_table where no='$user_no'"));
$user_id_r=$user_id_c[0];
}
else {
srand(time()); // 중복 방지를 위한 램덤출력.
$ran_c = (rand()%999); //0~999 숫자중 랜덤 출력
$user_id_r=$ran_c;
}
if($file1_size>0&&$setup[use_pds]&&$file1) {
if(!is_uploaded_file($file1)) Error("정상적인 방법으로 업로드 해주세요");
if($file1_name==$file2_name) Error("같은 파일은 등록할수 없습니다");
$file1_size=filesize($file1);
if($setup[max_upload_size]<$file1_size&&!$is_admin) error("첫번째 파일 업로드는 최고 ".GetFileSize($setup[max_upload_size])." 까지 가능합니다");
// 업로드 금지
if($file1_size>0) {
$s_file_name1=$file1_name;
if(substr($s_file_name1,0,1)=='.'||eregi("\.inc",$s_file_name1)||eregi("\.phtm",$s_file_name1)||eregi("\.htm",$s_file_name1)||eregi("\.shtm",$s_file_name1)||eregi("\.ztx",$s_file_name1)||eregi("\.php",$s_file_name1)||eregi("\.dot",$s_file_name1)||eregi("\.asp",$s_file_name1)||eregi("\.cgi",$s_file_name1)||eregi("\.pl",$s_file_name1)) Error("Html, PHP 관련파일은 업로드할수 없습니다");
//확장자 검사
if($setup[pds_ext1]) {
$temp=explode(".",$s_file_name1);
$s_point=count($temp)-1;
$upload_check=$temp[$s_point];
if(!eregi($upload_check,$setup[pds_ext1])||!$upload_check) Error("첫번째 업로드는 $setup[pds_ext1] 확장자만 가능합니다");
}
$file1=eregi_replace("\\\\","\\",$file1);
$s_file_name1=str_replace(" ","_",$s_file_name1);
$s_file_name1=str_replace("-","_",$s_file_name1);
// 디렉토리를 검사함
if(!is_dir("data/".$id)) {
@mkdir("data/".$id,0777);
@chmod("data/".$id,0706);
}
// 한글이름인 그림화일인 경우 날짜로 화일명 변환
preg_match('/.([^.]+)$/', $s_file_name1, $match1);
$gfile_name1_type=$match1[1];
if((eregi("jpg",$gfile_name1_type))||(eregi("jpeg",$gfile_name1_type))||(eregi("gif",$gfile_name1_type))||(eregi("bmp",$gfile_name1_type))||(eregi("png",$gfile_name1_type))||(eregi("zip",$gfile_name1_type))||(eregi("alz",$gfile_name1_type))) {
if(eregi("jpg",$gfile_name1_type)) $temp_c1="jpg";
elseif(eregi("jpeg",$gfile_name1_type)) $temp_c1="jpg";
elseif(eregi("gif",$gfile_name1_type)) $temp_c1="gif";
elseif(eregi("bmp",$gfile_name1_type)) $temp_c1="bmp";
elseif(eregi("png",$gfile_name1_type)) $temp_c1="png";
elseif(eregi("zip",$gfile_name1_type)) $temp_c1="zip";
else $temp_c1="alz";
if(eregi("'",$s_file_name1)) {
$temp_name1=$user_id_r."_".time()."_01";
$s_file_name1 = "$temp_name1.$temp_c1";
}
else {
for($i2=0;$i2<strlen($s_file_name1);$i2++)
{
if(ord($s_file_name1[$i2])>0x80)
{
$temp_name1=$user_id_r."_".time()."_01";
$s_file_name1 = "$temp_name1.$temp_c1";
break;
}
}
}
}
// 중복파일이 있을때;;
if(file_exists("data/$id/".$s_file_name1)) {
@mkdir("data/$id/".$reg_date,0777);
if(!move_uploaded_file($file1,"data/$id/".$reg_date."/".$s_file_name1)) Error("중복된 파일이 있습니다");
$file_name1="data/$id/".$reg_date."/".$s_file_name1;
@chmod($file_name1,0706);
@chmod("data/$id/".$reg_date,0707);
} else {
if(!move_uploaded_file($file1,"data/$id/".$s_file_name1)) Error("중복된 파일이 있습니다.");
$file_name1="data/$id/".$s_file_name1;
@chmod($file_name1,0706);
}
}
}
if($file2_size>0&&$setup[use_pds]&&$file2) {
if(!is_uploaded_file($file2)) Error("정상적인 방법으로 업로드 해주세요");
$file2_size=filesize($file2);
if($setup[max_upload_size]<$file2_size&&!$is_admin) error("파일 업로드는 최고 ".GetFileSize($setup[max_upload_size])." 까지 가능합니다");
if($file2_size>0) {
$s_file_name2=$file2_name;
if(substr($s_file_name2,0,1)=='.'||eregi("\.inc",$s_file_name2)||eregi("\.pht",$s_file_name2)||eregi("\.htm",$s_file_name2)||eregi("\.shtml",$s_file_name2)||eregi("\.ztx",$s_file_name2)||eregi("\.php",$s_file_name2)||eregi("\.dot",$s_file_name1)||eregi("\.asp",$s_file_name2)||eregi("\.cgi",$s_file_name2)||eregi("\.pl",$s_file_name2)) Error("Html, PHP 관련파일은 업로드할수 없습니다");
//확장자 검사
if($setup[pds_ext2]) {
$temp=explode(".",$s_file_name2);
$s_point=count($temp)-1;
$upload_check=$temp[$s_point];
if(!eregi($upload_check,$setup[pds_ext2])||!$upload_check) Error("업로드는 $setup[pds_ext2] 확장자만 가능합니다");
}
$file2=eregi_replace("\\\\","\\",$file2);
$s_file_name2=str_replace(" ","_",$s_file_name2);
$s_file_name2=str_replace("-","_",$s_file_name2);
// 디렉토리를 검사함
if(!is_dir("data/".$id)) {
mkdir("data/".$id,0777);
@chmod("data/".$id,0706);
}
// 한글이름인 그림화일인 경우 날짜로 화일명 변환
preg_match('/.([^.]+)$/', $s_file_name2, $match2);
$gfile_name2_type=$match2[1];
if((eregi("jpg",$gfile_name2_type))||(eregi("jpeg",$gfile_name2_type))||(eregi("gif",$gfile_name2_type))||(eregi("bmp",$gfile_name2_type))||(eregi("png",$gfile_name2_type))||(eregi("zip",$gfile_name2_type))||(eregi("alz",$gfile_name2_type))) {
if(eregi("jpg",$gfile_name2_type)) $temp_c2="jpg";
elseif(eregi("jpeg",$gfile_name2_type)) $temp_c2="jpg";
elseif(eregi("gif",$gfile_name2_type)) $temp_c2="gif";
elseif(eregi("bmp",$gfile_name2_type)) $temp_c2="bmp";
elseif(eregi("png",$gfile_name2_type)) $temp_c2="png";
elseif(eregi("zip",$gfile_name2_type)) $temp_c2="zip";
else $temp_c1="alz";
if(eregi("'",$s_file_name2)) {
$temp_name2=$user_id_r."_".time()."_02";
$s_file_name2 = "$temp_name2.$temp_c2";
}
else {
for($i2=0;$i2<strlen($s_file_name2);$i2++)
{
if(ord($s_file_name2[$i2])>0x80)
{
$temp_name2=$user_id_r."_".time()."_02";
$s_file_name2 = "$temp_name2.$temp_c2";
break;
}
}
}
}
// 중복파일이 있을때;;
if(file_exists("data/$id/".$s_file_name2)) {
@mkdir("data/$id/".$reg_date,0777);
if(!move_uploaded_file($file2,"data/$id/".$reg_date."/".$s_file_name2)) Error("중복된 파일이 있습니다.");
$file_name2="data/$id/".$reg_date."/".$s_file_name2;
@chmod($file_name2,0706);
@chmod("data/$id/".$reg_date,0707);
} else {
if(!move_uploaded_file($file2,"data/$id/".$s_file_name2)) Error("중복된 파일이 있습니다.");
$file_name2="data/$id/".$s_file_name2;
@chmod($file_name2,0706);
}
}
}
/*시작 */
if($file3_size>0&&$setup[use_pds]&&$file3) {
if(!is_uploaded_file($file3)) Error("정상적인 방법으로 업로드 해주세요");
$file3_size=filesize($file3);
if($setup[max_upload_size]<$file3_size&&!$is_admin) error("파일 업로드는 최고 ".GetFileSize($setup[max_upload_size])." 까지 가능합니다");
if($file3_size>0) {
$s_file_name3=$file3_name;
if(substr($s_file_name3,0,1)=='.'||eregi("\.inc",$s_file_name3)||eregi("\.pht",$s_file_name3)||eregi("\.htm",$s_file_name3)||eregi("\.shtml",$s_file_name3)||eregi("\.ztx",$s_file_name3)||eregi("\.php",$s_file_name3)||eregi("\.dot",$s_file_name3)||eregi("\.asp",$s_file_name3)||eregi("\.cgi",$s_file_name3)||eregi("\.pl",$s_file_name3)) Error("Html, PHP 관련파일은 업로드할수 없습니다");
//확장자 검사
if($setup[pds_ext2]) {
$temp=explode(".",$s_file_name3);
$s_point=count($temp)-1;
$upload_check=$temp[$s_point];
if(!eregi($upload_check,$setup[pds_ext2])||!$upload_check) Error("업로드는 $setup[pds_ext2] 확장자만 가능합니다");
}
$file3=eregi_replace("\\\\","\\",$file3);
$s_file_name3=str_replace(" ","_",$s_file_name3);
$s_file_name3=str_replace("-","_",$s_file_name3);
// 디렉토리를 검사함
if(!is_dir("data/".$id)) {
mkdir("data/".$id,0777);
@chmod("data/".$id,0706);
}
// 한글이름인 그림화일인 경우 날짜로 화일명 변환
preg_match('/.([^.]+)$/', $s_file_name3, $match3);
$gfile_name3_type=$match3[1];
if((eregi("jpg",$gfile_name3_type))||(eregi("jpeg",$gfile_name3_type))||(eregi("gif",$gfile_name3_type))||(eregi("bmp",$gfile_name3_type))||(eregi("png",$gfile_name3_type))||(eregi("zip",$gfile_name3_type))||(eregi("alz",$gfile_name3_type))) {
if(eregi("jpg",$gfile_name3_type)) $temp_c3="jpg";
elseif(eregi("jpeg",$gfile_name3_type)) $temp_c3="jpg";
elseif(eregi("gif",$gfile_name3_type)) $temp_c3="gif";
elseif(eregi("bmp",$gfile_name3_type)) $temp_c3="bmp";
elseif(eregi("png",$gfile_name3_type)) $temp_c3="png";
elseif(eregi("zip",$gfile_name3_type)) $temp_c3="zip";
else $temp_c1="alz";
if(eregi("'",$s_file_name3)) {
$temp_name3=$user_id_r."_".time()."_03";
$s_file_name3 = "$temp_name3.$temp_c3";
}
else {
for($i3=0;$i3<strlen($s_file_name3);$i3++)
{
if(ord($s_file_name3[$i3])>0x80)
{
$temp_name3=$user_id_r."_".time()."_03";
$s_file_name3 = "$temp_name3.$temp_c3";
break;
}
}
}
}
// 중복파일이 있을때;;
if(file_exists("data/$id/".$s_file_name3)) {
@mkdir("data/$id/".$reg_date,0777);
if(!move_uploaded_file($file3,"data/$id/".$reg_date."/".$s_file_name3)) Error("중복된 파일이 있습니다.");
$file_name3="data/$id/".$reg_date."/".$s_file_name3;
@chmod($file_name3,0706);
@chmod("data/$id/".$reg_date,0707);
} else {
if(!move_uploaded_file($file3,"data/$id/".$s_file_name3)) Error("중복된 파일이 있습니다.");
$file_name3="data/$id/".$s_file_name3;
@chmod($file_name3,0706);
}
}
}
if($file4_size>0&&$setup[use_pds]&&$file4) {
if(!is_uploaded_file($file4)) Error("정상적인 방법으로 업로드 해주세요");
$file4_size=filesize($file4);
if($setup[max_upload_size]<$file4_size&&!$is_admin) error("파일 업로드는 최고 ".GetFileSize($setup[max_upload_size])." 까지 가능합니다");
if($file4_size>0) {
$s_file_name4=$file4_name;
if(substr($s_file_name4,0,1)=='.'||eregi("\.inc",$s_file_name4)||eregi("\.pht",$s_file_name4)||eregi("\.htm",$s_file_name4)||eregi("\.shtml",$s_file_name4)||eregi("\.ztx",$s_file_name4)||eregi("\.php",$s_file_name4)||eregi("\.dot",$s_file_name4)||eregi("\.asp",$s_file_name4)||eregi("\.cgi",$s_file_name4)||eregi("\.pl",$s_file_name4)) Error("Html, PHP 관련파일은 업로드할수 없습니다");
//확장자 검사
if($setup[pds_ext2]) {
$temp=explode(".",$s_file_name4);
$s_point=count($temp)-1;
$upload_check=$temp[$s_point];
if(!eregi($upload_check,$setup[pds_ext2])||!$upload_check) Error("업로드는 $setup[pds_ext2] 확장자만 가능합니다");
}
$file4=eregi_replace("\\\\","\\",$file4);
$s_file_name4=str_replace(" ","_",$s_file_name4);
$s_file_name4=str_replace("-","_",$s_file_name4);
// 디렉토리를 검사함
if(!is_dir("data/".$id)) {
mkdir("data/".$id,0777);
@chmod("data/".$id,0706);
}
// 한글이름인 그림화일인 경우 날짜로 화일명 변환
preg_match('/.([^.]+)$/', $s_file_name4, $match4);
$gfile_name4_type=$match4[1];
if((eregi("jpg",$gfile_name4_type))||(eregi("jpeg",$gfile_name4_type))||(eregi("gif",$gfile_name4_type))||(eregi("bmp",$gfile_name4_type))||(eregi("png",$gfile_name4_type))||(eregi("zip",$gfile_name4_type))||(eregi("alz",$gfile_name4_type))) {
if(eregi("jpg",$gfile_name4_type)) $temp_c4="jpg";
elseif(eregi("jpeg",$gfile_name4_type)) $temp_c4="jpg";
elseif(eregi("gif",$gfile_name4_type)) $temp_c4="gif";
elseif(eregi("bmp",$gfile_name4_type)) $temp_c4="bmp";
elseif(eregi("png",$gfile_name4_type)) $temp_c4="png";
elseif(eregi("zip",$gfile_name4_type)) $temp_c4="zip";
else $temp_c1="alz";
if(eregi("'",$s_file_name4)) {
$temp_name4=$user_id_r."_".time()."_04";
$s_file_name4 = "$temp_name4.$temp_c4";
}
else {
for($i4=0;$i4<strlen($s_file_name4);$i4++)
{
if(ord($s_file_name4[$i4])>0x80)
{
$temp_name4=$user_id_r."_".time()."_04";
$s_file_name4 = "$temp_name4.$temp_c4";
break;
}
}
}
}
// 중복파일이 있을때;;
if(file_exists("data/$id/".$s_file_name4)) {
@mkdir("data/$id/".$reg_date,0777);
if(!move_uploaded_file($file4,"data/$id/".$reg_date."/".$s_file_name4)) Error("중복된 파일이 있습니다.");
$file_name4="data/$id/".$reg_date."/".$s_file_name4;
@chmod($file_name4,0706);
@chmod("data/$id/".$reg_date,0707);
} else {
if(!move_uploaded_file($file4,"data/$id/".$s_file_name4)) Error("중복된 파일이 있습니다.");
$file_name4="data/$id/".$s_file_name4;
@chmod($file_name4,0706);
}
}
}
if($file5_size>0&&$setup[use_pds]&&$file5) {
if(!is_uploaded_file($file5)) Error("정상적인 방법으로 업로드 해주세요");
$file5_size=filesize($file5);
if($setup[max_upload_size]<$file5_size&&!$is_admin) error("파일 업로드는 최고 ".GetFileSize($setup[max_upload_size])." 까지 가능합니다");
if($file5_size>0) {
$s_file_name5=$file5_name;
if(substr($s_file_name5,0,1)=='.'||eregi("\.inc",$s_file_name5)||eregi("\.pht",$s_file_name5)||eregi("\.htm",$s_file_name5)||eregi("\.shtml",$s_file_name5)||eregi("\.ztx",$s_file_name5)||eregi("\.php",$s_file_name5)||eregi("\.dot",$s_file_name5)||eregi("\.asp",$s_file_name5)||eregi("\.cgi",$s_file_name5)||eregi("\.pl",$s_file_name5)) Error("Html, PHP 관련파일은 업로드할수 없습니다");
//확장자 검사
if($setup[pds_ext2]) {
$temp=explode(".",$s_file_name5);
$s_point=count($temp)-1;
$upload_check=$temp[$s_point];
if(!eregi($upload_check,$setup[pds_ext2])||!$upload_check) Error("업로드는 $setup[pds_ext2] 확장자만 가능합니다");
}
$file5=eregi_replace("\\\\","\\",$file5);
$s_file_name5=str_replace(" ","_",$s_file_name5);
$s_file_name5=str_replace("-","_",$s_file_name5);
// 디렉토리를 검사함
if(!is_dir("data/".$id)) {
mkdir("data/".$id,0777);
@chmod("data/".$id,0706);
}
// 한글이름인 그림화일인 경우 날짜로 화일명 변환
preg_match('/.([^.]+)$/', $s_file_name5, $match5);
$gfile_name5_type=$match5[1];
if((eregi("jpg",$gfile_name5_type))||(eregi("jpeg",$gfile_name5_type))||(eregi("gif",$gfile_name5_type))||(eregi("bmp",$gfile_name5_type))||(eregi("png",$gfile_name5_type))||(eregi("zip",$gfile_name5_type))||(eregi("alz",$gfile_name5_type))) {
if(eregi("jpg",$gfile_name5_type)) $temp_c5="jpg";
elseif(eregi("jpeg",$gfile_name5_type)) $temp_c5="jpg";
elseif(eregi("gif",$gfile_name5_type)) $temp_c5="gif";
elseif(eregi("bmp",$gfile_name5_type)) $temp_c5="bmp";
elseif(eregi("png",$gfile_name5_type)) $temp_c5="png";
elseif(eregi("zip",$gfile_name5_type)) $temp_c5="zip";
else $temp_c1="alz";
if(eregi("'",$s_file_name5)) {
$temp_name5=$user_id_r."_".time()."_05";
$s_file_name5 = "$temp_name5.$temp_c5";
}
else {
for($i5=0;$i5<strlen($s_file_name5);$i5++)
{
if(ord($s_file_name5[$i5])>0x80)
{
$temp_name5=$user_id_r."_".time()."_05";
$s_file_name5 = "$temp_name5.$temp_c5";
break;
}
}
}
}
// 중복파일이 있을때;;
if(file_exists("data/$id/".$s_file_name5)) {
@mkdir("data/$id/".$reg_date,0777);
if(!move_uploaded_file($file5,"data/$id/".$reg_date."/".$s_file_name5)) Error("중복된 파일이 있습니다.");
$file_name5="data/$id/".$reg_date."/".$s_file_name5;
@chmod($file_name5,0706);
@chmod("data/$id/".$reg_date,0707);
} else {
if(!move_uploaded_file($file5,"data/$id/".$s_file_name5)) Error("중복된 파일이 있습니다.");
$file_name5="data/$id/".$s_file_name5;
@chmod($file_name5,0706);
}
}
}
if($file6_size>0&&$setup[use_pds]&&$file6) {
if(!is_uploaded_file($file6)) Error("정상적인 방법으로 업로드 해주세요");
$file6_size=filesize($file6);
if($setup[max_upload_size]<$file6_size&&!$is_admin) error("파일 업로드는 최고 ".GetFileSize($setup[max_upload_size])." 까지 가능합니다");
if($file6_size>0) {
$s_file_name6=$file6_name;
if(substr($s_file_name6,0,1)=='.'||eregi("\.inc",$s_file_name6)||eregi("\.pht",$s_file_name6)||eregi("\.htm",$s_file_name6)||eregi("\.shtml",$s_file_name6)||eregi("\.ztx",$s_file_name6)||eregi("\.php",$s_file_name6)||eregi("\.dot",$s_file_name6)||eregi("\.asp",$s_file_name6)||eregi("\.cgi",$s_file_name6)||eregi("\.pl",$s_file_name6)) Error("Html, PHP 관련파일은 업로드할수 없습니다");
//확장자 검사
if($setup[pds_ext2]) {
$temp=explode(".",$s_file_name6);
$s_point=count($temp)-1;
$upload_check=$temp[$s_point];
if(!eregi($upload_check,$setup[pds_ext2])||!$upload_check) Error("업로드는 $setup[pds_ext2] 확장자만 가능합니다");
}
$file6=eregi_replace("\\\\","\\",$file6);
$s_file_name6=str_replace(" ","_",$s_file_name6);
$s_file_name6=str_replace("-","_",$s_file_name6);
// 디렉토리를 검사함
if(!is_dir("data/".$id)) {
mkdir("data/".$id,0777);
@chmod("data/".$id,0706);
}
// 한글이름인 그림화일인 경우 날짜로 화일명 변환
preg_match('/.([^.]+)$/', $s_file_name6, $match6);
$gfile_name6_type=$match6[1];
if((eregi("jpg",$gfile_name6_type))||(eregi("jpeg",$gfile_name6_type))||(eregi("gif",$gfile_name6_type))||(eregi("bmp",$gfile_name6_type))||(eregi("png",$gfile_name6_type))||(eregi("zip",$gfile_name6_type))||(eregi("alz",$gfile_name6_type))) {
if(eregi("jpg",$gfile_name6_type)) $temp_c6="jpg";
elseif(eregi("jpeg",$gfile_name6_type)) $temp_c6="jpg";
elseif(eregi("gif",$gfile_name6_type)) $temp_c6="gif";
elseif(eregi("bmp",$gfile_name6_type)) $temp_c6="bmp";
elseif(eregi("png",$gfile_name6_type)) $temp_c6="png";
elseif(eregi("zip",$gfile_name6_type)) $temp_c6="zip";
else $temp_c1="alz";
if(eregi("'",$s_file_name6)) {
$temp_name6=$user_id_r."_".time()."_06";
$s_file_name6 = "$temp_name6.$temp_c6";
}
else {
for($i6=0;$i6<strlen($s_file_name6);$i6++)
{
if(ord($s_file_name6[$i6])>0x80)
{
$temp_name6=$user_id_r."_".time()."_06";
$s_file_name6 = "$temp_name6.$temp_c6";
break;
}
}
}
}
// 중복파일이 있을때;;
if(file_exists("data/$id/".$s_file_name6)) {
@mkdir("data/$id/".$reg_date,0777);
if(!move_uploaded_file($file6,"data/$id/".$reg_date."/".$s_file_name6)) Error("중복된 파일이 있습니다.");
$file_name6="data/$id/".$reg_date."/".$s_file_name6;
@chmod($file_name6,0706);
@chmod("data/$id/".$reg_date,0707);
} else {
if(!move_uploaded_file($file6,"data/$id/".$s_file_name6)) Error("중복된 파일이 있습니다.");
$file_name6="data/$id/".$s_file_name6;
@chmod($file_name6,0706);
}
}
}
if($file7_size>0&&$setup[use_pds]&&$file7) {
if(!is_uploaded_file($file7)) Error("정상적인 방법으로 업로드 해주세요");
$file7_size=filesize($file7);
if($setup[max_upload_size]<$file7_size&&!$is_admin) error("파일 업로드는 최고 ".GetFileSize($setup[max_upload_size])." 까지 가능합니다");
if($file7_size>0) {
$s_file_name7=$file7_name;
if(substr($s_file_name7,0,1)=='.'||eregi("\.inc",$s_file_name7)||eregi("\.pht",$s_file_name7)||eregi("\.htm",$s_file_name7)||eregi("\.shtml",$s_file_name7)||eregi("\.ztx",$s_file_name7)||eregi("\.php",$s_file_name7)||eregi("\.dot",$s_file_name7)||eregi("\.asp",$s_file_name7)||eregi("\.cgi",$s_file_name7)||eregi("\.pl",$s_file_name7)) Error("Html, PHP 관련파일은 업로드할수 없습니다");
//확장자 검사
if($setup[pds_ext2]) {
$temp=explode(".",$s_file_name7);
$s_point=count($temp)-1;
$upload_check=$temp[$s_point];
if(!eregi($upload_check,$setup[pds_ext2])||!$upload_check) Error("업로드는 $setup[pds_ext2] 확장자만 가능합니다");
}
$file7=eregi_replace("\\\\","\\",$file7);
$s_file_name7=str_replace(" ","_",$s_file_name7);
$s_file_name7=str_replace("-","_",$s_file_name7);
// 디렉토리를 검사함
if(!is_dir("data/".$id)) {
mkdir("data/".$id,0777);
@chmod("data/".$id,0706);
}
// 한글이름인 그림화일인 경우 날짜로 화일명 변환
preg_match('/.([^.]+)$/', $s_file_name7, $match7);
$gfile_name7_type=$match7[1];
if((eregi("jpg",$gfile_name7_type))||(eregi("jpeg",$gfile_name7_type))||(eregi("gif",$gfile_name7_type))||(eregi("bmp",$gfile_name7_type))||(eregi("png",$gfile_name7_type))||(eregi("zip",$gfile_name7_type))||(eregi("alz",$gfile_name7_type))) {
if(eregi("jpg",$gfile_name7_type)) $temp_c7="jpg";
elseif(eregi("jpeg",$gfile_name7_type)) $temp_c7="jpg";
elseif(eregi("gif",$gfile_name7_type)) $temp_c7="gif";
elseif(eregi("bmp",$gfile_name7_type)) $temp_c7="bmp";
elseif(eregi("png",$gfile_name7_type)) $temp_c7="png";
elseif(eregi("zip",$gfile_name7_type)) $temp_c7="zip";
else $temp_c1="alz";
if(eregi("'",$s_file_name7)) {
$temp_name7=$user_id_r."_".time()."_07";
$s_file_name7 = "$temp_name7.$temp_c7";
}
else {
for($i7=0;$i7<strlen($s_file_name7);$i7++)
{
if(ord($s_file_name7[$i7])>0x80)
{
$temp_name7=$user_id_r."_".time()."_07";
$s_file_name7 = "$temp_name7.$temp_c7";
break;
}
}
}
}
// 중복파일이 있을때;;
if(file_exists("data/$id/".$s_file_name7)) {
@mkdir("data/$id/".$reg_date,0777);
if(!move_uploaded_file($file7,"data/$id/".$reg_date."/".$s_file_name7)) Error("중복된 파일이 있습니다.");
$file_name7="data/$id/".$reg_date."/".$s_file_name7;
@chmod($file_name7,0706);
@chmod("data/$id/".$reg_date,0707);
} else {
if(!move_uploaded_file($file7,"data/$id/".$s_file_name7)) Error("중복된 파일이 있습니다.");
$file_name7="data/$id/".$s_file_name7;
@chmod($file_name7,0706);
}
}
}
if($file8_size>0&&$setup[use_pds]&&$file8) {
if(!is_uploaded_file($file8)) Error("정상적인 방법으로 업로드 해주세요");
$file8_size=filesize($file8);
if($setup[max_upload_size]<$file8_size&&!$is_admin) error("파일 업로드는 최고 ".GetFileSize($setup[max_upload_size])." 까지 가능합니다");
if($file8_size>0) {
$s_file_name8=$file8_name;
if(substr($s_file_name8,0,1)=='.'||eregi("\.inc",$s_file_name8)||eregi("\.pht",$s_file_name8)||eregi("\.htm",$s_file_name8)||eregi("\.shtml",$s_file_name8)||eregi("\.ztx",$s_file_name8)||eregi("\.php",$s_file_name8)||eregi("\.dot",$s_file_name8)||eregi("\.asp",$s_file_name8)||eregi("\.cgi",$s_file_name8)||eregi("\.pl",$s_file_name8)) Error("Html, PHP 관련파일은 업로드할수 없습니다");
//확장자 검사
if($setup[pds_ext2]) {
$temp=explode(".",$s_file_name8);
$s_point=count($temp)-1;
$upload_check=$temp[$s_point];
if(!eregi($upload_check,$setup[pds_ext2])||!$upload_check) Error("업로드는 $setup[pds_ext2] 확장자만 가능합니다");
}
$file8=eregi_replace("\\\\","\\",$file8);
$s_file_name8=str_replace(" ","_",$s_file_name8);
$s_file_name8=str_replace("-","_",$s_file_name8);
// 디렉토리를 검사함
if(!is_dir("data/".$id)) {
mkdir("data/".$id,0777);
@chmod("data/".$id,0706);
}
// 한글이름인 그림화일인 경우 날짜로 화일명 변환
preg_match('/.([^.]+)$/', $s_file_name8, $match8);
$gfile_name8_type=$match8[1];
if((eregi("jpg",$gfile_name8_type))||(eregi("jpeg",$gfile_name8_type))||(eregi("gif",$gfile_name8_type))||(eregi("bmp",$gfile_name8_type))||(eregi("png",$gfile_name8_type))||(eregi("zip",$gfile_name8_type))||(eregi("alz",$gfile_name8_type))) {
if(eregi("jpg",$gfile_name8_type)) $temp_c8="jpg";
elseif(eregi("jpeg",$gfile_name8_type)) $temp_c8="jpg";
elseif(eregi("gif",$gfile_name8_type)) $temp_c8="gif";
elseif(eregi("bmp",$gfile_name8_type)) $temp_c8="bmp";
elseif(eregi("png",$gfile_name8_type)) $temp_c8="png";
elseif(eregi("zip",$gfile_name8_type)) $temp_c8="zip";
else $temp_c1="alz";
if(eregi("'",$s_file_name8)) {
$temp_name8=$user_id_r."_".time()."_08";
$s_file_name8 = "$temp_name8.$temp_c8";
}
else {
for($i8=0;$i8<strlen($s_file_name8);$i8++)
{
if(ord($s_file_name8[$i8])>0x80)
{
$temp_name8=$user_id_r."_".time()."_08";
$s_file_name8 = "$temp_name8.$temp_c8";
break;
}
}
}
}
// 중복파일이 있을때;;
if(file_exists("data/$id/".$s_file_name8)) {
@mkdir("data/$id/".$reg_date,0777);
if(!move_uploaded_file($file8,"data/$id/".$reg_date."/".$s_file_name8)) Error("중복된 파일이 있습니다.");
$file_name8="data/$id/".$reg_date."/".$s_file_name8;
@chmod($file_name8,0706);
@chmod("data/$id/".$reg_date,0707);
} else {
if(!move_uploaded_file($file8,"data/$id/".$s_file_name8)) Error("중복된 파일이 있습니다.");
$file_name8="data/$id/".$s_file_name8;
@chmod($file_name8,0706);
}
}
}
if($file9_size>0&&$setup[use_pds]&&$file9) {
if(!is_uploaded_file($file9)) Error("정상적인 방법으로 업로드 해주세요");
$file9_size=filesize($file9);
if($setup[max_upload_size]<$file9_size&&!$is_admin) error("파일 업로드는 최고 ".GetFileSize($setup[max_upload_size])." 까지 가능합니다");
if($file9_size>0) {
$s_file_name9=$file9_name;
if(substr($s_file_name9,0,1)=='.'||eregi("\.inc",$s_file_name9)||eregi("\.pht",$s_file_name9)||eregi("\.htm",$s_file_name9)||eregi("\.shtml",$s_file_name9)||eregi("\.ztx",$s_file_name9)||eregi("\.php",$s_file_name9)||eregi("\.dot",$s_file_name9)||eregi("\.asp",$s_file_name9)||eregi("\.cgi",$s_file_name9)||eregi("\.pl",$s_file_name9)) Error("Html, PHP 관련파일은 업로드할수 없습니다");
//확장자 검사
if($setup[pds_ext2]) {
$temp=explode(".",$s_file_name9);
$s_point=count($temp)-1;
$upload_check=$temp[$s_point];
if(!eregi($upload_check,$setup[pds_ext2])||!$upload_check) Error("업로드는 $setup[pds_ext2] 확장자만 가능합니다");
}
$file9=eregi_replace("\\\\","\\",$file9);
$s_file_name9=str_replace(" ","_",$s_file_name9);
$s_file_name9=str_replace("-","_",$s_file_name9);
// 디렉토리를 검사함
if(!is_dir("data/".$id)) {
mkdir("data/".$id,0777);
@chmod("data/".$id,0706);
}
// 한글이름인 그림화일인 경우 날짜로 화일명 변환
preg_match('/.([^.]+)$/', $s_file_name9, $match9);
$gfile_name9_type=$match9[1];
if((eregi("jpg",$gfile_name9_type))||(eregi("jpeg",$gfile_name9_type))||(eregi("gif",$gfile_name9_type))||(eregi("bmp",$gfile_name9_type))||(eregi("png",$gfile_name9_type))||(eregi("zip",$gfile_name9_type))||(eregi("alz",$gfile_name9_type))) {
if(eregi("jpg",$gfile_name9_type)) $temp_c9="jpg";
elseif(eregi("jpeg",$gfile_name9_type)) $temp_c9="jpg";
elseif(eregi("gif",$gfile_name9_type)) $temp_c9="gif";
elseif(eregi("bmp",$gfile_name9_type)) $temp_c9="bmp";
elseif(eregi("png",$gfile_name9_type)) $temp_c9="png";
elseif(eregi("zip",$gfile_name9_type)) $temp_c9="zip";
else $temp_c1="alz";
if(eregi("'",$s_file_name9)) {
$temp_name9=$user_id_r."_".time()."_09";
$s_file_name9 = "$temp_name9.$temp_c9";
}
else {
for($i9=0;$i9<strlen($s_file_name9);$i9++)
{
if(ord($s_file_name9[$i9])>0x80)
{
$temp_name9=$user_id_r."_".time()."_09";
$s_file_name9 = "$temp_name9.$temp_c9";
break;
}
}
}
}
// 중복파일이 있을때;;
if(file_exists("data/$id/".$s_file_name9)) {
@mkdir("data/$id/".$reg_date,0777);
if(!move_uploaded_file($file9,"data/$id/".$reg_date."/".$s_file_name9)) Error("중복된 파일이 있습니다.");
$file_name9="data/$id/".$reg_date."/".$s_file_name9;
@chmod($file_name9,0706);
@chmod("data/$id/".$reg_date,0707);
} else {
if(!move_uploaded_file($file9,"data/$id/".$s_file_name9)) Error("중복된 파일이 있습니다.");
$file_name9="data/$id/".$s_file_name9;
@chmod($file_name9,0706);
}
}
}if($file10_size>0&&$setup[use_pds]&&$file10) {
if(!is_uploaded_file($file10)) Error("정상적인 방법으로 업로드 해주세요");
$file10_size=filesize($file10);
if($setup[max_upload_size]<$file10_size&&!$is_admin) error("파일 업로드는 최고 ".GetFileSize($setup[max_upload_size])." 까지 가능합니다");
if($file10_size>0) {
$s_file_name10=$file10_name;
if(substr($s_file_name10,0,1)=='.'||eregi("\.inc",$s_file_name10)||eregi("\.pht",$s_file_name10)||eregi("\.htm",$s_file_name10)||eregi("\.shtml",$s_file_name10)||eregi("\.ztx",$s_file_name10)||eregi("\.php",$s_file_name10)||eregi("\.dot",$s_file_name10)||eregi("\.asp",$s_file_name10)||eregi("\.cgi",$s_file_name10)||eregi("\.pl",$s_file_name10)) Error("Html, PHP 관련파일은 업로드할수 없습니다");
//확장자 검사
if($setup[pds_ext2]) {
$temp=explode(".",$s_file_name10);
$s_point=count($temp)-1;
$upload_check=$temp[$s_point];
if(!eregi($upload_check,$setup[pds_ext2])||!$upload_check) Error("업로드는 $setup[pds_ext2] 확장자만 가능합니다");
}
$file10=eregi_replace("\\\\","\\",$file10);
$s_file_name10=str_replace(" ","_",$s_file_name10);
$s_file_name10=str_replace("-","_",$s_file_name10);
// 디렉토리를 검사함
if(!is_dir("data/".$id)) {
mkdir("data/".$id,0777);
@chmod("data/".$id,0706);
}
// 한글이름인 그림화일인 경우 날짜로 화일명 변환
preg_match('/.([^.]+)$/', $s_file_name10, $match10);
$gfile_name10_type=$match10[1];
if((eregi("jpg",$gfile_name10_type))||(eregi("jpeg",$gfile_name10_type))||(eregi("gif",$gfile_name10_type))||(eregi("bmp",$gfile_name10_type))||(eregi("png",$gfile_name10_type))||(eregi("zip",$gfile_name10_type))||(eregi("alz",$gfile_name10_type))) {
if(eregi("jpg",$gfile_name10_type)) $temp_c10="jpg";
elseif(eregi("jpeg",$gfile_name10_type)) $temp_c10="jpg";
elseif(eregi("gif",$gfile_name10_type)) $temp_c10="gif";
elseif(eregi("bmp",$gfile_name10_type)) $temp_c10="bmp";
elseif(eregi("png",$gfile_name10_type)) $temp_c10="png";
elseif(eregi("zip",$gfile_name10_type)) $temp_c10="zip";
else $temp_c1="alz";
if(eregi("'",$s_file_name10)) {
$temp_name10=$user_id_r."_".time()."_010";
$s_file_name10 = "$temp_name10.$temp_c10";
}
else {
for($i10=0;$i10<strlen($s_file_name10);$i10++)
{
if(ord($s_file_name10[$i10])>0x80)
{
$temp_name10=$user_id_r."_".time()."_010";
$s_file_name10 = "$temp_name10.$temp_c10";
break;
}
}
}
}
// 중복파일이 있을때;;
if(file_exists("data/$id/".$s_file_name10)) {
@mkdir("data/$id/".$reg_date,0777);
if(!move_uploaded_file($file10,"data/$id/".$reg_date."/".$s_file_name10)) Error("중복된 파일이 있습니다.");
$file_name10="data/$id/".$reg_date."/".$s_file_name10;
@chmod($file_name10,0706);
@chmod("data/$id/".$reg_date,0707);
} else {
if(!move_uploaded_file($file10,"data/$id/".$s_file_name10)) Error("중복된 파일이 있습니다.");
$file_name10="data/$id/".$s_file_name10;
@chmod($file_name10,0706);
}
}
}
/***************************************************************************
* 수정글일때
**************************************************************************/
if($mode=="modify"&&$no) {
if($s_data[ismember]) {
if(!$is_admin&&$member[level]>$setup[grant_delete]&&$s_data[ismember]!=$member[no]) Error("정상적인 방법으로 수정하세요");
}
// 비밀번호 검사;;
if($s_data[ismember]!=$member[no]&&!$is_admin) {
if($password!=$s_data[password]) Error("비밀번호가 틀렸습니다");
}
// 파일삭제
if($del_file1==1) {@z_unlink("./".$s_data[file_name1]);$del_que1=",file_name1='',s_file_name1=''";}
if($del_file2==1) {@z_unlink("./".$s_data[file_name2]);$del_que2=",file_name2='',s_file_name2=''";}
if($del_file3==1) {@z_unlink("./".$s_data[file_name3]);$del_que3=",file_name3='',s_file_name3=''";}
if($del_file4==1) {@z_unlink("./".$s_data[file_name4]);$del_que4=",file_name4='',s_file_name4=''";}
if($del_file5==1) {@z_unlink("./".$s_data[file_name5]);$del_que5=",file_name5='',s_file_name5=''";}
if($del_file6==1) {@z_unlink("./".$s_data[file_name6]);$del_que6=",file_name6='',s_file_name6=''";}
if($del_file7==1) {@z_unlink("./".$s_data[file_name7]);$del_que7=",file_name7='',s_file_name7=''";}
if($del_file8==1) {@z_unlink("./".$s_data[file_name8]);$del_que8=",file_name8='',s_file_name8=''";}
if($del_file9==1) {@z_unlink("./".$s_data[file_name9]);$del_que9=",file_name9='',s_file_name9=''";}
if($del_file10==1) {@z_unlink("./".$s_data[file_name10]);$del_que10=",file_name10='',s_file_name10=''";}
// 파일등록
if($file_name1) {$del_que1=",file_name1='$file_name1',s_file_name1='$s_file_name1'";}
if($file_name2) {$del_que2=",file_name2='$file_name2',s_file_name2='$s_file_name2'";}
if($file_name3) {$del_que3=",file_name3='$file_name3',s_file_name3='$s_file_name3'";}
if($file_name4) {$del_que4=",file_name4='$file_name4',s_file_name4='$s_file_name4'";}
if($file_name5) {$del_que5=",file_name5='$file_name5',s_file_name5='$s_file_name5'";}
if($file_name6) {$del_que6=",file_name6='$file_name6',s_file_name6='$s_file_name6'";}
if($file_name7) {$del_que7=",file_name7='$file_name7',s_file_name7='$s_file_name7'";}
if($file_name8) {$del_que8=",file_name8='$file_name8',s_file_name8='$s_file_name8'";}
if($file_name9) {$del_que9=",file_name9='$file_name9',s_file_name9='$s_file_name9'";}
if($file_name10) {$del_que10=",file_name10='$file_name10',s_file_name10='$s_file_name10'";}
// 공지 -> 일반글
if(!$notice&&$s_data[headnum]<="-2000000000") {
$temp=mysql_fetch_array(mysql_query("select max(division) from $t_division"."_$id"));
$max_division=$temp[0];
$temp=mysql_fetch_array(mysql_query("select max(division) from $t_division"."_$id where num>0 and division!='$max_division'"));
if(!$temp[0]) $second_division=0; else $second_division=$temp[0];
// 헤드넘+1 한값을 가짐;;
$max_headnum=mysql_fetch_array(mysql_query("select min(headnum) from $t_board"."_$id where (division='$max_division' or division='$second_division') and headnum>-2000000000")); // 공지가 아닌 최소 headnum 구함
$headnum=$max_headnum[0]-1;
$next_data=mysql_fetch_array(mysql_query("select no,headnum,division from $t_board"."_$id where (division='$max_division' or division='$second_division') and headnum='$max_headnum[0]' and arrangenum='0'")); // 다음글을 구함;;
if(!$next_data[0]) $next_data[0]="0";
$next_no=$next_data[0];
if(!$next_data[division]) $division=1; else $division=$next_data[division];
$prev_data=mysql_fetch_array(mysql_query("select no from $t_board"."_$id where (division='$max_division' or division='$second_division') and headnum<'$headnum' and no!='$no' order by headnum desc limit 1")); // 이전글을 구함;;
if($prev_data[0]) $prev_no=$prev_data[0]; else $prev_no=0;
$child="0";
$depth="0";
$arrangenum="0";
$father="0";
minus_division($s_data[division]);
@mysql_query("update $t_board"."_$id set headnum='$headnum',prev_no='$prev_no',next_no='$next_no',child='$child',depth='$depth',arrangenum='$arrangenum',father='$father',name='$name',email='$email',homepage='$homepage',subject='$subject',memo='$memo',sitelink1='$sitelink1',sitelink2='$sitelink2',use_html='$use_html',reply_mail='$reply_mail',is_secret='$is_secret',category='$category' $del_que1 $del_que2 $del_que3 $del_que4 $del_que5 $del_que6 $del_que7 $del_que8 $del_que9 $del_que10 where no='$no'") or error(mysql_error());
plus_division($division);
// 다음글의 이전글을 수정
if($next_no)mysql_query("update $t_board"."_$id set prev_no='$no' where division='$next_data[division]' and headnum='$next_data[headnum]'");
// 이전글의 다음글을 수정
if($prev_no)mysql_query("update $t_board"."_$id set next_no='$no' where no='$prev_no'");
mysql_query("update $t_board"."_$id set prev_no=0 where (division='$max_division' or division='$second_division') and prev_no='$s_data[no]' and headnum!='$next_data[headnum]'");
mysql_query("update $t_category"."_$id set num=num-1 where no='$s_data[category]'",$connect);
mysql_query("update $t_category"."_$id set num=num+1 where no='$category'",$connect);
}
// 일반글 -> 공지
elseif($notice&&$s_data[headnum]>-2000000000) {
$temp=mysql_fetch_array(mysql_query("select max(division) from $t_division"."_$id"));
$max_division=$temp[0];
$temp=mysql_fetch_array(mysql_query("select max(division) from $t_division"."_$id where num>0 and division!='$max_division'"));
if(!$temp[0]) $second_division=0; else $second_division=$temp[0];
$max_headnum=mysql_fetch_array(mysql_query("select min(headnum) from $t_board"."_$id where division='$max_division' or division='$second_division'")); // 최고글을 구함;;
$headnum=$max_headnum[0]-1;
if($headnum>-2000000000) $headnum=-2000000000; // 최고 headnum이 공지가 아니면 현재 글에 공지를 넣음;
$next_data=mysql_fetch_array(mysql_query("select no,headnum,division from $t_board"."_$id where (division='$max_division' or division='$second_division') and headnum='$max_headnum[0]' and arrangenum='0'"));
if(!$next_data[0]) $next_data[0]="0";
$next_no=$next_data[0];
$prev_no=0;
$child="0";
$depth="0";
$arrangenum="0";
$father="0";
minus_division($s_data[division]);
$division=add_division();
@mysql_query("update $t_board"."_$id set division='$division',headnum='$headnum',prev_no='$prev_no',next_no='$next_no',child='$child',depth='$depth',arrangenum='$arrangenum',father='$father',name='$name',email='$email',homepage='$homepage',subject='$subject',memo='$memo',sitelink1='$sitelink1',sitelink2='$sitelink2',use_html='$use_html',reply_mail='$reply_mail',is_secret='$is_secret',category='$category' $del_que1 $del_que2 $del_que3 $del_que4 $del_que5 $del_que6 $del_que7 $del_que8 $del_que9 $del_que10 where no='$no'") or error(mysql_error());
if($s_data[father]) mysql_query("update $t_board"."_$id set child='$s_data[child]' where no='$s_data[father]'"); // 답글이었으면 원본글의 답글을 현재글의 답글로 대체
if($s_data[child]) mysql_query("update $t_board"."_$id set depth=depth-1,father='$s_data[father]' where no='$s_data[child]'"); // 답글이 있으면 현재글의 위치로;;
// 원래 다음글로 이글을 가지고 있었던 데이타의 prev_no을 바꿈;
$temp=mysql_fetch_array(mysql_query("select max(headnum) from $t_board"."_$id where headnum<='$s_data[headnum]'"));
$temp=mysql_fetch_array(mysql_query("select no from $t_board"."_$id where headnum='$temp[0]' and depth='0'"));
mysql_query("update $t_board"."_$id set prev_no='$temp[no]' where prev_no='$s_data[no]'");
mysql_query("update $t_board"."_$id set next_no='$s_data[next_no]' where next_no='$s_data[no]'");
mysql_query("update $t_board"."_$id set prev_no='$no' where prev_no='0' and no!='$no'") or error(mysql_error()); // 다음글의 이전글을 설정
mysql_query("update $t_category"."_$id set num=num-1 where no='$s_data[category]'",$connect);
mysql_query("update $t_category"."_$id set num=num+1 where no='$category'",$connect);
// 일반->일반, 공지->공지 일때
} else {
@mysql_query("update $t_board"."_$id set name='$name',subject='$subject',email='$email',homepage='$homepage',memo='$memo',sitelink1='$sitelink1',sitelink2='$sitelink2',use_html='$use_html',reply_mail='$reply_mail',is_secret='$is_secret',category='$category' $del_que1 $del_que2 $del_que3 $del_que4 $del_que5 $del_que6 $del_que7 $del_que8 $del_que9 $del_que10 where no='$no'") or error(mysql_error());
mysql_query("update $t_category"."_$id set num=num-1 where no='$s_data[category]'",$connect);
mysql_query("update $t_category"."_$id set num=num+1 where no='$category'",$connect);
}
/***************************************************************************
* 답변글일때
**************************************************************************/
} elseif($mode=="reply"&&$no) {
$prev_no=$s_data[prev_no];
$next_no=$s_data[next_no];
$father=$s_data[no];
$child=0;
$headnum=$s_data[headnum];
if($headnum<=-2000000000&&$notice) Error("공지사항에는 답글을 달수가 없습니다");
$depth=$s_data[depth]+1;
$arrangenum=$s_data[arrangenum]+1;
$move_result=mysql_query("select no from $t_board"."_$id where division='$s_data[division]' and headnum='$headnum' and arrangenum>='$arrangenum'");
while($move_data=mysql_fetch_array($move_result)) {
mysql_query("update $t_board"."_$id set arrangenum=arrangenum+1 where no='$move_data[no]'");
}
$division=$s_data[division];
plus_division($s_data[division]);
// 답글 데이타 입력;;
mysql_query("insert into $t_board"."_$id (division,headnum,arrangenum,depth,prev_no,next_no,father,child,ismember,memo,ip,password,name,homepage,email,subject,use_html,reply_mail,category,is_secret,sitelink1,sitelink2,file_name1,file_name2,file_name3,file_name4,file_name5,file_name6,file_name7,file_name8,file_name9,file_name10,s_file_name1,s_file_name2,s_file_name3,s_file_name4,s_file_name5,s_file_name6,s_file_name7,s_file_name8,s_file_name9,s_file_name10,x,y,reg_date,islevel) values ('$division','$headnum','$arrangenum','$depth','$prev_no','$next_no','$father','$child','$member[no]','$memo','$ip','$password','$name','$homepage','$email','$subject','$use_html','$reply_mail','$category','$is_secret','$sitelink1','$sitelink2','$file_name1','$file_name2','$file_name3','$file_name4','$file_name5','$file_name6','$file_name7','$file_name8','$file_name9','$file_name10','$s_file_name1','$s_file_name2','$s_file_name3','$s_file_name4','$s_file_name5','$s_file_name6','$s_file_name7','$s_file_name8','$s_file_name9','$s_file_name10','$x','$y','$reg_date','$member[is_admin]')") or error(mysql_error());
// 원본글과 원본글의 아래글의 속성 변경;;
$no=mysql_insert_id();
mysql_query("update $t_board"."_$id set child='$no' where no='$s_data[no]'");
mysql_query("update $t_category"."_$id set num=num+1 where no='$category'",$connect);
// 현재글의 조회수를 올릴수 없게 세션 등록
$hitStr=",".$setup[no]."_".$no;
$zb_hit=$HTTP_SESSION_VARS["zb_hit"].$hitStr;
session_register("zb_hit");
// 현재글의 추천을 할수 없게 세션 등록
$voteStr=",".$setup[no]."_".$no;
$zb_vote=$HTTP_SESSION_VARS["zb_vote"].$voteStr;
session_register("zb_vote");
// 응답글 보내기일때;;
if($s_data[reply_mail]&&$s_data[email]) {
if($use_html<2) $memo=nl2br($memo);
$memo = stripslashes($memo);
zb_sendmail($use_html, $s_data[email], $s_data[name], $email, $name, $subject, $memo);
}
/***************************************************************************
* 신규 글쓰기일때
**************************************************************************/
} elseif($mode=="write") {
// 공지사항이 아닐때;;
if(!$notice) {
$temp=mysql_fetch_array(mysql_query("select max(division) from $t_division"."_$id"));
$max_division=$temp[0];
$temp=mysql_fetch_array(mysql_query("select max(division) from $t_division"."_$id where num>0 and division!='$max_division'"));
if(!$temp[0]) $second_division=0; else $second_division=$temp[0];
$max_headnum=mysql_fetch_array(mysql_query("select min(headnum) from $t_board"."_$id where (division='$max_division' or division='$second_division') and headnum>-2000000000"));
if(!$max_headnum[0]) $max_headnum[0]=0;
$headnum=$max_headnum[0]-1;
$next_data=mysql_fetch_array(mysql_query("select division,headnum,arrangenum from $t_board"."_$id where (division='$max_division' or division='$second_division') and headnum>-2000000000 order by headnum limit 1"));
if(!$next_data[0]) $next_data[0]="0";
else {
$next_data=mysql_fetch_array(mysql_query("select no,headnum,division from $t_board"."_$id where division='$next_data[division]' and headnum='$next_data[headnum]' and arrangenum='$next_data[arrangenum]'"));
}
$prev_data=mysql_fetch_array(mysql_query("select no from $t_board"."_$id where (division='$max_division' or division='$second_division') and headnum<=-2000000000 order by headnum desc limit 1"));
if($prev_data[0]) $prev_no=$prev_data[0]; else $prev_no="0";
// 공지사항일때;;
} else {
$temp=mysql_fetch_array(mysql_query("select max(division) from $t_division"."_$id"));
$max_division=$temp[0]+1;
$temp=mysql_fetch_array(mysql_query("select max(division) from $t_division"."_$id where num>0 and division!='$max_division'"));
if(!$temp[0]) $second_division=0; else $second_division=$temp[0];
$max_headnum=mysql_fetch_array(mysql_query("select min(headnum) from $t_board"."_$id where division='$max_division' or division='$second_division'"));
$headnum=$max_headnum[0]-1;
if($headnum>-2000000000) $headnum=-2000000000;
$next_data=mysql_fetch_array(mysql_query("select division,headnum from $t_board"."_$id where division='$max_division' or division='$second_division' order by headnum limit 1"));
if(!$next_data[0]) $next_data[0]="0";
else {
$next_data=mysql_fetch_array(mysql_query("select no,headnum,division from $t_board"."_$id where division='$next_data[division]' and headnum='$next_data[headnum]' and arrangenum='0'"));
}
$prev_no=0;
}
$next_no=$next_data[no];
$child="0";
$depth="0";
$arrangenum="0";
$father="0";
$division=add_division();
mysql_query("insert into $t_board"."_$id (division,headnum,arrangenum,depth,prev_no,next_no,father,child,ismember,memo,ip,password,name,homepage,email,subject,use_html,reply_mail,category,is_secret,sitelink1,sitelink2,file_name1,file_name2,file_name3,file_name4,file_name5,file_name6,file_name7,file_name8,file_name9,file_name10,s_file_name1,s_file_name2,s_file_name3,s_file_name4,s_file_name5,s_file_name6,s_file_name7,s_file_name8,s_file_name9,s_file_name10,x,y,reg_date,islevel) values ('$division','$headnum','$arrangenum','$depth','$prev_no','$next_no','$father','$child','$member[no]','$memo','$ip','$password','$name','$homepage','$email','$subject','$use_html','$reply_mail','$category','$is_secret','$sitelink1','$sitelink2','$file_name1','$file_name2','$file_name3','$file_name4','$file_name5','$file_name6','$file_name7','$file_name8','$file_name9','$file_name10','$s_file_name1','$s_file_name2','$s_file_name3','$s_file_name4','$s_file_name5','$s_file_name6','$s_file_name7','$s_file_name8','$s_file_name9','$s_file_name10','$x','$y','$reg_date','$member[is_admin]')") or error(mysql_error());
$no=mysql_insert_id();
// 현재글의 조회수를 올릴수 없게 세션 등록
$hitStr=",".$setup[no]."_".$no;
$zb_hit=$HTTP_SESSION_VARS["zb_hit"].$hitStr;
session_register("zb_hit");
// 현재글의 추천을 할수 없게 세션 등록
$voteStr=",".$setup[no]."_".$no;
$zb_vote=$HTTP_SESSION_VARS["zb_vote"].$voteStr;
session_register("zb_vote");
if($prev_no) mysql_query("update $t_board"."_$id set next_no='$no' where no='$prev_no'");
if($next_no) mysql_query("update $t_board"."_$id set prev_no='$no' where headnum='$next_data[headnum]' and division='$next_data[division]'");
mysql_query("update $t_category"."_$id set num=num+1 where no='$category'",$connect);
}
// 글의 갯수를 다시 갱신
$total=mysql_fetch_array(mysql_query("select count(*) from $t_board"."_$id "));
mysql_query("update $admin_table set total_article='$total[0]' where name='$id'");
// 회원일 경우 해당 해원의 점수 주기
if($mode=="write"||$mode=="reply") @mysql_query("update $member_table set point1=point1+1 where no='$member[no]'",$connect) or error(mysql_error());
// MySQL 닫기
if($connect) {
mysql_close($connect);
unset($connect);
}
// 페이지 이동
//if($setup[use_alllist]) $view_file="zboard.php"; else $view_file="view.php";
$view_file = "zboard.php";
movepage($view_file."?id=$id&page=$page&page_num=$page_num&select_arrange=$select_arrange&desc=$des&sn=$sn&ss=$ss&sc=$sc&keyword=$keyword&no=$no&category=$category");
?>
--------------------------------------
조언 좀 부탁드려요
즐겁고 편안한 주말 되세요~
안녕히 계세요~
- [2020/03/27] 묻고답하기 관리자로 들어가려는데 이런 메세지가 계속 뜹니다 해결방법이 없을까요? *1
댓글 2
-
BRANDYK
2017.10.27 20:55
-
버들이291
2017.10.28 01:03
예.. 조언해주신 내용 감안해서 작업하여 고민을 해결 하였어요~
// 페이지 이동
if($setup[use_alllist]) $view_file="zboard.php"; else $view_file="view.php";
/* $view_file = "zboard.php"; */
movepage($view_file."?id=$id&page=$page&page_num=$page_num&select_arrange=$select_arrange&desc=$des&sn=$sn&ss=$ss&sc=$sc&keyword=$keyword&no=$no&category=$category");
?>와 같이 해서 고민을 해결하였어요~
도움을 주신 BRANDYK 님께 정말 감사드립니다.
즐겁고 편안한 주말 되셔요~.
제로보드는 써보지 않아 잘 모르겠지만,
// 페이지 이동
//if($setup[use_alllist]) $view_file="zboard.php"; else $view_file="view.php";
$view_file = "zboard.php";
movepage($view_file."?id=$id&page=$page&page_num=$page_num&select_arrange=$select_arrange&desc=$des&sn=$sn&ss=$ss&sc=$sc&keyword=$keyword&no=$no&category=$category");
?>
에서 $view_file = "zboard.php"; 를 지워보심이 어떤가 합니다.