function selectdate2($syear,$strobj,$sdate1,$sdate2,$sdate3,$sdate4,$sdate5,$ctrobj,$ctrobj2){ $sobj1=""; for($k=$syear;$k<=DATE('Y');$k++){ $sobj1.="".$k.""; } $sobj1.=""; $sobj2=""; for($k=1;$k<13;$k++){ if($k<10){ $nu="0".$k; }else{ $nu=$k; } $sobj2.="".$nu.""; } $sobj2.=""; switch($sdate2){ case "02": $sdatediv = ($sdate1 - 2008) % 4; if($sdatediv > 0){ $enddate= "28"; }else{ $enddate= "29"; } break; case "04": case "06": case "09": case "11": $enddate="30"; break; default: $enddate="31"; break; } $sobj3=""; for($k=1;$k<=$enddate;$k++){ if($k<10){ $nu="0".$k; }else{ $nu=$k; } $sobj3.="".$nu.""; } $sobj3.=""; $sobj4=""; for($k=1;$k<=24;$k++){ if($k<10){ $nu="0".$k; }else{ $nu=$k; } $sobj4.="".$nu.""; } $sobj4.=""; $sobj5=""; for($k=0;$k<=60;$k=$k+5){ if($k<10){ $nu="0".$k; }else{ $nu=$k; } $sobj5.="".$nu.""; } $sobj5.=""; $sobj = Array($sobj1,$sobj2,$sobj3,$sobj4,$sobj5); return $sobj; } function getRequest($value){ $value = rejectXss(rejectIjt($value)); $value = str_replace("&",'&',$value); $value = str_replace("<",'<',$value); $value = str_replace(">",'>',$value); $value = str_replace('"','"',$value); $value = str_replace("'",''',$value); return $value; } function convSql($value){ $value = rejectXss(rejectIjt($value)); $value = str_replace('&',"&",$value); $value = str_replace('<',"<",$value); $value = str_replace('>',">",$value); $value = str_replace('"','"',$value); $value = str_replace(''',"'",$value); return $value; } function rejectIjt($value){ $event_tags = array( 'dynsrc','datasrc','frameset','ilayer','layer','applet', 'onabort','onactivate','onafterprint','onsubmit','onunload', 'onafterupdate','onbeforeactivate','onbeforecopy','onbeforecut', 'onbeforedeactivate','onbeforeeditfocus','onbeforepaste','onbeforeprint', 'onbeforeunload','onbeforeupdate','onblur','onbounce','oncellchange', 'onchange','onclick','oncontextmenu','oncontrolselect','oncopy','oncut', 'ondataavaible','ondatasetchanged','ondatasetcomplete','ondblclick', 'ondeactivate','ondrag','ondragdrop','ondragend','ondragenter', 'ondragleave','ondragover','ondragstart','ondrop','onerror','onerrorupdate', 'onfilterupdate','onfinish','onfocus','onfocusin','onfocusout','onhelp', 'onkeydown','onkeypress','onkeyup','onlayoutcomplete','onload','onlosecapture', 'onmousedown','onmouseenter','onmouseleave','onmousemove','onmoveout', 'onmouseover','onmouseup','onmousewheel','onmove','onmoveend','onmovestart', 'onpaste','onpropertychange','onreadystatechange','onreset','onresize', 'onresizeend','onresizestart','onrowexit','onrowsdelete','onrowsinserted', 'onscroll','onselect','onselectionchange','onselectstart','onstart','onstop' ); $tempxss = implode("|",$event_tags); $tvalue=explode("|",$tempxss); for($k=0;$k $ORIGN_HEIGHT) { $aImgSize['WIDTH'] = $MAX_WIDTH; $aImgSize['HEIGHT'] = ceil($ORIGN_HEIGHT * $MAX_WIDTH / $ORIGN_WIDTH); } else if($ORIGN_WIDTH < $ORIGN_HEIGHT) { $aImgSize['WIDTH'] = ceil($ORIGN_WIDTH * $MAX_HEIGHT / $ORIGN_HEIGHT); $aImgSize['HEIGHT'] = $MAX_HEIGHT; } else { $aImgSize['WIDTH'] = ceil($ORIGN_WIDTH * $MAX_HEIGHT / $ORIGN_HEIGHT); $aImgSize['HEIGHT'] = ceil($ORIGN_HEIGHT * $MAX_WIDTH / $ORIGN_WIDTH); } if($aImgSize['WIDTH'] > $MAX_WIDTH) { $aImgSize['WIDTH'] = $MAX_WIDTH; $aImgSize['HEIGHT'] = ceil($ORIGN_HEIGHT * $MAX_WIDTH / $ORIGN_WIDTH); } if($aImgSize['HEIGHT'] > $MAX_HEIGHT) { $aImgSize['WIDTH'] = ceil($ORIGN_WIDTH * $MAX_HEIGHT / $ORIGN_HEIGHT); $aImgSize['HEIGHT'] = $MAX_HEIGHT; } } return $aImgSize; } #************************************** # GD 2.대 파일 리사이즈 # 1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF, 5 = PSD, 6 = BMP, 7 = TIFF(intel byte order), 8 = TIFF(motorola byte order), # 9 = JPC, 10 = JP2, 11 = JPX, 12 = JB2, 13 = SWC, 14 = IFF, 15 = WBMP, 16 = XBM. function resizeImage($cOrignFile,$cThumbFile,$iThumbWidth,$iThumbHeihgt) { #************************************** # 이미지 일경우 이미지관련정보 값입력 $aGetImageInfo = @getimagesize($cOrignFile); $aGetImageSize['IMG_TYPE'] = intval($aGetImageInfo[2]); $aGetImageSize['IMG_WIDTH'] = intval($aGetImageInfo[0]); $aGetImageSize['IMG_HEIGHT'] = intval($aGetImageInfo[1]); #************************************** #************************************** # # 1 = GIF, 2 = JPG, 3 = PNG 만 지원 if($aGetImageSize['IMG_TYPE'] > 0 && $aGetImageSize['IMG_TYPE'] < 4) { #************************************** # 제작할 이미지 사이즈 가져오기 $aThumbSize = resizeGetWidthHeight($aGetImageSize['IMG_WIDTH'],$aGetImageSize['IMG_HEIGHT'], $iThumbWidth,$iThumbHeihgt); #************************************** #************************************** # 타입별 이미지 생성 $oImgCreate = NULL; switch($aGetImageSize['IMG_TYPE']) { case 1 : $oImgCreate = imagecreatefromgif($cOrignFile); break; # GIF case 2 : $oImgCreate = imagecreatefromjpeg($cOrignFile); break; # jpg case 3 : $oImgCreate = imagecreatefrompng($cOrignFile); break; # png } #************************************** #************************************** # GD 2.0 이상 - 이미지 리사이즈 $oImgTrueColor = imagecreatetruecolor($aThumbSize['WIDTH'],$aThumbSize['HEIGHT']); imagecopyresampled($oImgTrueColor,$oImgCreate,0,0,0,0, $aThumbSize['WIDTH'],$aThumbSize['HEIGHT'], $aGetImageSize['IMG_WIDTH'], $aGetImageSize['IMG_HEIGHT']); #imagecopyresized($oImgTrueColor,$oImgCreate,0,0,0,0,$aThumbSize['WIDTH'],$aThumbSize['HEIGHT'],$aGetImageSize['IMG_WIDTH'], $aGetImageSize['IMG_HEIGHT']); # 1.x대 리사이즈 #************************************** #************************************** # 이미지가 존재할경우 삭제하기 if(file_exists($cThumbFile) == true) { @unlink($cThumbFile); } #************************************** #************************************** # 이미지 생성하기 switch($aGetImageSize['IMG_TYPE']) { case 1 : imagegif($oImgTrueColor,$cThumbFile); break; # GIF [GD2.0이상] case 2 : imagejpeg($oImgTrueColor,$cThumbFile,80); break; # jpg case 3 : imagepng($oImgTrueColor,$cThumbFile); break; # png } #************************************** #************************************** # 메모리에서 이미지 삭제하기 imagedestroy($oImgCreate); imagedestroy($oImgTrueColor); #************************************** #************************************** # 파일 권한 변경하기 if(file_exists($cThumbFile) == true) { @chmod ($cThumbFile, 0707); } #************************************** } # end if #************************************** } #************************************** function UidCheck($table,$event,$number){ if($event=="write" || $event=="reply") { $sql="SELECT max(uid), max(fid) FROM $table"; $result = mysql_query($sql); echo mysql_error(); $row = mysql_fetch_row($result); if($row[1]) {$new_uid=$row[0] + 1; $new_fid = $row[0] + 1; } else {$new_uid=1; $new_fid = 1;} $new_thread = "A"; } if($event=="reply" || $event=="modify") { $resql2 = "select * from $table where uid=$number"; $reresult2 = mysql_query($resql2); $rerow2 = mysql_fetch_array($reresult2); if($event=="reply") { $sql2 = "select thread,right(thread,1) from $table where fid=$rerow2[fid] and length(thread)=length('$rerow2[thread]')+1 and locate('$rerow2[thread]',thread)=1 order by thread desc limit 1"; $result = mysql_query($sql2); if(!$result) { //error("QUERY_ERROR"); exit; } $rows = mysql_num_rows($result); if($rows) { $row = mysql_fetch_row($result); $thread_head = substr($row[0],0,-1); $thread_foot = ++$row[1]; $new_thread = $thread_head.$thread_foot; } else { $new_thread = $rerow2[thread]."A"; } $new_fid = $rerow2[fid]; } } $Value[0]=$new_uid; $Value[1]=$new_fid; $Value[2]=$new_thread; return $Value; } function ReturnUrl($table){ switch($table){ case "BON_Notice": $return="../../notice/sub_01.html"; break; } return $return; } // 문자열 끊기 function cut_str($msg,$cut_size,$str){ if($cut_size!=""){ if($cut_size<=0) return $msg; if(ereg("\[re\]",$msg)) $cut_size=$cut_size+4; for($i=0;$i<$cut_size;$i++) if(ord($msg[$i])>127) $han++; else $eng++; $cut_size=$cut_size+(int)$han*0.6; $point=1; for($i=0;$i$cut_size) return $pointtmp.$str; if(ord($msg[$i])<=127){ $pointtmp.= $msg[$i]; if ($point%$cut_size==0) return $pointtmp.$str; }else{ if($point%$cut_size==0) return $pointtmp.$str; $pointtmp.=$msg[$i].$msg[++$i]; $point++; } $point++; } return $pointtmp; } } function subpagef($total,$scale,$pagescale,$pn,$img1,$imgs1,$img2,$imgs2,$imgS1,$imgsS1,$imgS2,$imgsS2,$topage,$Param,$RLurl) { GLOBAL $_SERVER,$_GET,$_POST,$_GETVARS; $pagescale="5"; $cutpage_num = (int) ceil($total/$scale); $now_num = (int) ceil($pn/$pagescale); $start_num = (int) ($now_num - 1) * $pagescale; $end_num = (int) $now_num * $pagescale; $next_num = (int) $end_num + 1;//마지막 페이지 값 구함 $prev_num = (int) $start_num;//시작 페이지 값 구함 $next_num2 = (int) $topage; $prev_num2 = (int) 1; $RLurls=urldecode($RLurl); if ( $now_num > 1 ) { $first_teg = ""; if($imgs1=="1")$first_teg.="◀"; else $first_teg.="◀"; } Else { if($imgs1=="1")$first_teg="◀"; else $first_teg="◀"; } for ($i = $start_num + 1; $i <= $end_num && $i <= $cutpage_num; $i++) { if ($i > 1){ $cutnum = ""; }else{ $cutnum = ""; } if ($i == $pn) { if($i<10)$no="".$i;else $no=$i; $cutnum .= "".$no.""; } Else { if($i<10)$no="0".$i;else $no=$i; $cutnum .= "".$no.""; } $cutvars .=$cutnum; } if ( $end_num < $cutpage_num ) { $last_teg = " "; if($imgs2=="1")$last_teg.="▶"; else $last_teg.="▶"; } Else { if($imgs2=="1")$last_teg="▶"; else $last_teg="▶"; } $subpage = Array($first_teg,$cutvars,$last_teg); return $subpage; } function subpage($total,$scale,$pagescale,$pn,$topage,$Param,$RLurl) { GLOBAL $_SERVER,$_GET,$_POST,$_GETVARS; $pagescale="5"; $cutpage_num = (int) ceil($total/$scale); $now_num = (int) ceil($pn/$pagescale); $start_num = (int) ($now_num - 1) * $pagescale; $end_num = (int) $now_num * $pagescale; $next_num = (int) $end_num + 1;//마지막 페이지 값 구함 $prev_num = (int) $start_num;//시작 페이지 값 구함 $next_num2 = (int) $topage; $prev_num2 = (int) 1; // if ( $cutpage_num $RLurls=urldecode($RLurl); if ( $pn > $pagescale ) { $first_teg2 = ""; } Else { $first_teg2=""; } if ( $now_num > 1 ) { $first_teg = ""; } Else { $first_teg=""; } for ($i = $start_num + 1; $i <= $end_num && $i <= $cutpage_num; $i++) { if ($i > 1){ $cutnum = ""; }else{ $cutnum = ""; } if ($i == $pn) { if($i<10)$no="".$i;else $no=$i; $cutnum .= "".$no.""; } Else { if($i<10)$no="".$i;else $no=$i; $cutnum .= "\r".$no.""; } $cutvars .=$cutnum; } if ( $end_num < $cutpage_num ) { $last_teg = " "; } Else { $last_teg=""; } if ( $end_num < $cutpage_num ) { $last_teg2 = ""; } Else { $last_teg2=""; } $subpage = Array($first_teg2,$first_teg,$cutvars,$last_teg,$last_teg2); return $subpage; } function subpage2($total,$scale,$pagescale,$pn,$img1,$imgs1,$img2,$imgs2,$imgS1,$imgsS1,$imgS2,$imgsS2,$topage,$Param,$RLurl) { GLOBAL $_SERVER,$_GET,$_POST,$_GETVARS; $cutpage_num = (int) ceil($total/$scale); $now_num = (int) ceil($pn/$pagescale); $start_num = (int) ($now_num - 1) * $pagescale; $end_num = (int) $now_num * $pagescale; $next_num = (int) $end_num + 1;//마지막 페이지 값 구함 $prev_num = (int) $start_num;//시작 페이지 값 구함 $next_num2 = (int) $topage; $prev_num2 = (int) 1; // if ( $cutpage_num $RLurls=urldecode($RLurl); if ( $pn > $pagescale ) { $first_teg2 = ""; if($imgsS1=="1")$first_teg2.="$imgS1"; else $first_teg2.=""; } Else { if($imgsS1=="1")$first_teg2="$imgS1"; else $first_teg2=""; } if ( $now_num > 1 ) { $first_teg = ""; if($imgs1=="1")$first_teg.="$img1"; else $first_teg.=""; } Else { if($imgs1=="1")$first_teg="$img1"; else $first_teg=""; } for ($i = $start_num + 1; $i <= $end_num && $i <= $cutpage_num; $i++) { if ($i > 1){ $cutnum = ""; }else{ $cutnum = ""; } if ($i == $pn) { if($i<10)$no="0".$i;else $no=$i; $cutnum .= "".$no.""; } Else { if($i<10)$no="0".$i;else $no=$i; $cutnum .= "".$no.""; } $cutvars .=$cutnum; } if ( $end_num < $cutpage_num ) { $last_teg = " "; if($imgs2=="1")$last_teg.="$img2"; else $last_teg.=""; } Else { if($imgs2=="1")$last_teg="$img2"; else $last_teg=""; } if ( $end_num < $cutpage_num ) { $last_teg2 = " "; if($imgsS2=="1")$last_teg2.="$imgS2"; else $last_teg2.=""; } Else { if($imgsS2=="1")$last_teg2="$imgS2"; else $last_teg2=""; } $subpage = Array($first_teg2,$first_teg,$cutvars,$last_teg,$last_teg2); return $subpage; } function subpages2($total,$scale,$pagescale,$pn,$img1,$imgs1,$img2,$imgs2,$imgS1,$imgsS1,$imgS2,$imgsS2,$topage,$Param,$RLurl) { GLOBAL $_SERVER,$_GET,$_POST,$_GETVARS; $cutpage_num = (int) ceil($total/$scale); $now_num = (int) ceil($pn/$pagescale); $start_num = (int) ($now_num - 1) * $pagescale; $end_num = (int) $now_num * $pagescale; $next_num = (int) $end_num + 1;//마지막 페이지 값 구함 $prev_num = (int) $start_num;//시작 페이지 값 구함 $next_num2 = (int) $topage; $prev_num2 = (int) 1; // if ( $cutpage_num $RLurls=urldecode($RLurl); if ( $pn > $pagescale ) { $first_teg2 = ""; if($imgsS1=="1")$first_teg2.="$imgS1"; else $first_teg2.=" "; } Else { if($imgsS1=="1")$first_teg2="$imgS1"; else $first_teg2=" "; } if ( $now_num > 1 ) { $first_teg = ""; if($imgs1=="1")$first_teg.="$img1"; else $first_teg.=" "; } Else { if($imgs1=="1")$first_teg="$img1"; else $first_teg=" "; } for ($i = $start_num + 1; $i <= $end_num && $i <= $cutpage_num; $i++) { if ($i > 1){ $cutnum = ""; }else{ $cutnum = ""; } if($i == ($cutpage_num)){ if ($i == $pn) { if($i<10)$no=$i;else $no=$i; $cutnum .= "".$no." "; } Else { if($i<10)$no=$i;else $no=$i; $cutnum .= "".$no." "; } }else{ if ($i == $pn) { if($i<10)$no=$i;else $no=$i; $cutnum .= "".$no." "; } Else { if($i<10)$no=$i;else $no=$i; $cutnum .= "".$no." "; } } $cutvars .=$cutnum; } if ( $end_num < $cutpage_num ) { $last_teg = " "; if($imgs2=="1")$last_teg.="$img2"; else $last_teg.=" "; } Else { if($imgs2=="1")$last_teg="$img2"; else $last_teg=" "; } if ( $end_num < $cutpage_num ) { $last_teg2 = " "; if($imgsS2=="1")$last_teg2.="$imgS2"; else $last_teg2.=" "; } Else { if($imgsS2=="1")$last_teg2="$imgS2"; else $last_teg2=" "; } $subpage = Array($first_teg2,$first_teg,$cutvars,$last_teg,$last_teg2); return $subpage; } function AutoLink($content) { if ($content) { $pattern = "/(http|https|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-]+)+(:[0-9]{2,4})?\/?"; // domain+port $pattern .= "([\.~_0-9a-z-]+\/?)*"; // sub roots or sub directory $pattern .= "(\S+\.[_0-9a-z]+\??)?" ; // file & extension string $pattern .= "([_0-9a-z#&=-]+)*/i"; // parameters $replace = "\\0"; $autolinked = preg_replace($pattern, $replace, $content, -1); $autolinked = str_replace("\n", "\r\n", $autolinked); return $autolinked; } } function HTML_CHECK($html,$Content,$db){ switch($html) { case "0": //자동링크를 사용할지결정에 따라서 $Content = htmlspecialchars($Content); $Content = str_replace(" "," ",$Content); $Content = nl2br($Content); break; case "1": //$Content = AutoLink($Content); break; case "2": break; default: break; } return $Content; } function db_data($table_name,$connect) { $sql = "show table status from jinsung LIKE '{$table_name}' "; $result = mysql_query($sql); $row = mysql_fetch_row($result); $return_value[0] = $row[3]; $return_value[1] = ceil(($row[5]+$row[7])/1000); return $return_value; } /*--------------------------------------------------------------------/ | 하위 폴더 및 파일을 자동으로 읽어온 후 처리하는 함수들 ---------------------------------------------------------------------*/ // $dirURL 값으로 넘어온 url에 디렉토리가 존재하면.. select 박스에 태그를 존재하는 디렉토리 갯수 만큼 늘려주는 함수.. function dir_select($objURL, $fieldName, $type) { $ReturnValue = array(); if($type=="colorset"){ $imsi=explode("*",$objURL); $imsi[0].="/colorset"; $objURL=$imsi[0]; } $dirHandle = opendir($objURL); while($dirURL=readdir($dirHandle)) { if(($dirURL != ".") && ($dirURL != "..")) { $imsi=explode(".",$dirURL); if(sizeof($imsi)<2){ $HowManyNo++; $ReturnValue[1][$HowManyNo] = $dirURL; if($type=="skin"){ $dirURL2=$dirURL; if($fieldName == "$dirURL") { if(is_file("$objURL/$dirURL/skin.gif")) { $dirURL2=$dirURL."*1"; } $Rstr.= "$dirURL\n"; $dirURL2 = ""; }else { if(is_file("$objURL/$dirURL/skin.gif")) { $dirURL2=$dirURL."*1"; } $Rstr.= "$dirURL\n"; $dirURL2=""; } }else if($type=="colorset"){ $Rstr.= "$dirURL"; } else { if($fieldName == "$dirURL") { $Rstr.= "$dirURL\n"; } else { $Rstr.= "$dirURL\n"; } } } } $ReturnValue[0][0] = $Rstr; $ReturnValue[0][1] = $HowManyNo; } closedir($dirHandle); return $ReturnValue; } function ficon($fnames){ $fnametmp=explode(".",$fnames); $fxmx=sizeof($fnametmp)-1; switch($fnametmp[$fxmx]){ case "xls": case "xlsx": return "excel"; break; case "pptx": case "ppt": return "powerpoint"; break; default: return "file"; break; } } function ficont($fnames){ $fnametmp=explode(".",$fnames); $fxmx=sizeof($fnametmp)-1; switch($fnametmp[$fxmx]){ case "xls": case "xlsx": return "엑셀 파일"; break; case "pptx": case "ppt": return "파워포인트 파일"; break; default: return "일반 파일"; break; } } function fsizes($furl){ $fsize=filesize($furl); if($fsize > 1024){ $fsize = round(($fsize / 1024),2); $fsizetxt = "MB"; }else{ $fsize = round($fsize,2); $fsizetxt = "KB"; } return $fsize . " ".$fsizetxt; } function dir_file($file, $kk) { if (is_dir($file)) { $handle = opendir($file); while($filename=readdir($handle)) { if($filename!="." && $filename!="..") { $str = explode(".",$filename); if(sizeof($str)==2 && ($str[1]=="gif" || $str[1]=="GIF" || $str[1]=="jpg" || $str[1]=="JPG")) { ?> } } } // while($filename=readdir($handle)) 끝 closedir($handle); } // if (is_dir($file)) 끝 } Class MimeMail { var $encoding = '8bit'; var $parts; var $to; var $from; var $name; var $headers; var $subject; var $body; var $html; var $boundary; ##설명 : 생성자 함수. Class 생성과 동시에 실행변수를 초기화 한다. ##파일 : array(0=>array(ftmp=>'',fname=>'',ftype=>'')); function mime_mail($from,$name,$to,$subject,$body,$html,$parts) { $this->to = trim($to); $this->from = trim($from); $this->name = trim($name); $this->subject = $subject; $this->body = $body; $this->headers = $header; $this->html = $html; $this->parts = $parts; } ## 인코딩 |-------------------------------- function str_encoding($str,$type=0) { switch ($this->encoding) { case 'base64' : if ($type ==1) $message = '=?euc-kr?B?'.chunk_split(base64_encode($str)).'?='; else $message = chunk_split(base64_encode($str)); break; default : $message = $str; } return $message; } ## 본문 내용을 |--------------------------- function build_message($content) { $message = $this->str_encoding($content,$type=''); // 첨부파일이 일을 경우 if ($this->boundary) { $ctype = '--'.$this->boundary."\r\n"; $ctype.= 'Content-Type: text/html; charset="euc-kr"'."\r\n"; $ctype.= 'Content-Transfer-Encoding: '.$this->encoding."\r\n"; return $ctype."\r\n".$message."\r\n"; } else { return $message."\r\n"; } } ## 파일 첨부 내용 |---------------------------------------- /* 예제 |------------- $tmpUpPath = $path.'/'._FILE_.'/tmpfile'; $uploadlist = $path.'/'._FILE_.'/tmpfile/'.$_REQUEST['PHPSESSID'].'.txt'; $xf_sendfile= ''; if(@filesize($uploadlist)) { $xf_fp = @file($uploadlist); $xf_count = count($xf_fp); for($xf=0; $xf<$xf_count; $xf++) { $xf_fname = explode("\t",$xf_fp[$xf]); $xf_tmpname = $tmpUpPath.'/'.$xf_fname[0]; $xf_arr = @getimagesize($xf_tmpname); # array $xf_sendfile[$xf]['ftmp'] = $xf_tmpname; $xf_sendfile[$xf]['fname'] = $xf_fname[1]; $xf_sendfile[$xf]['ftype'] = $xf_arr['mime']; @unlink($uploadlist); } } ----*/ function build_file_message() { $multi_type = ''; $count = count($this->parts); for ($i=0; $i<$count; $i++) { $varz['filez'] = $this->parts[$i]['ftmp']; $varz['filename'] = $this->parts[$i]['fname']; $varz['filetype'] = $this->parts[$i]['ftype']; $multi_type.= '--'.$this->boundary."\r\n"; $multi_type.= 'Content-Type: '.$varz['filetype'].'; name="'.$this->str_encoding($varz['filename'],1).'"'."\r\n"; $multi_type.= 'Content-Disposition: inline; filename="'.$this->str_encoding($varz['filename'],1).'"'."\r\n"; $multi_type.= 'Content-Transfer-Encoding: base64'."\r\n"; $multi_type.= 'X-HM-IDENT: attach'."\r\n\r\n"; $tmp_contents = @fread(@fopen($varz['filez'], 'r'), @filesize($varz['filez'])); @unlink($varz['filez']); $multi_type.= chunk_split(base64_encode($tmp_contents)); $multi_type.= "\r\n"; } $multi_type.= '--'.$this->boundary.'--'."\r\n"; return $multi_type; } ## Header |----------------------------- function get_headers() { $headers = 'MIME-Version: 1.0'."\r\n"; # From : if(!empty($this->from)){ $headers .= 'From: '.$this->str_encoding($this->name,1).'<'.$this->from.'>'."\r\n"; } # Content-Type: | Content-Transfer-Encoding: |-- // 파일이 있을 때 --> if ( is_array($this->parts) ) { $this->boundary = 'apm'.md5(uniqid(time())).'soft'; $headers .= 'Content-Type: multipart/mixed; boundary="'.$this->boundary.'"'."\r\n"; } // 내용만 있을 때 --> else { if ($this->html ==1) $headers .= 'Content-Type: text/html; charset="euc-kr"'."\r\n"; else $headers .= 'Content-Type: text/plain; charset="euc-kr"'."\r\n"; # Content-Transfer-Encoding : $headers .= 'Content-Transfer-Encoding: '.$this->encoding."\r\n"; } return $headers; } ## 메일 보내는 함수 |---------------------- function send() { # headers |-- $headers = $this->get_headers(); # Body |-- if($this->body) $contents = $this->build_message($this->body); # file |-- if($this->boundary) $contents.= $this->build_file_message(); # send | result |-- if(@mail($this->to,$this->str_encoding($this->subject,1), $contents, $headers)) return 1; else return -1; } } // 경고메세지를 경고창으로 function alert($msg='', $url='') { if (!$msg) $msg = '올바른 방법으로 이용해 주십시오.'; echo ""; echo ""; if ($url) goto_url($url); exit; } ?> $DCBHostName = "localhost"; $DCBDataBase = "omniscie"; $DCBUserID = "omniscie"; $DCBPasswd = "dbserapis54"; $Tableconnect = mysql_connect("$DCBHostName","$DCBUserID","$DCBPasswd"); if(!$Tableconnect) die(" ̽ ῡ ߽ϴ...T.T"); $status = mysql_select_db("$DCBDataBase",$Tableconnect); if(!$status) exit; $orderp = 3; ?> 오라소마 세라피스센터 ABOUT SERAPIS 인사말 세라피스센터 소개 업무사항 제휴안내 AURA-SOMA Aura-soma란 오라소마의 역사 오라소마의 철학 빛깔과 의식 빛깔과 몸 오라소마 상담 ACADEMY 오라소마 교육과정의 개요 칼라케어컨설턴트 양성 오라소마 티쳐 양성 스페셜 코스 PRODUCT Equilibrium Bottle Special Set Pomander Quintessence Colour Essences Archangeloi Air-Conditioner COMMUNITY 세라피스 소식 교육안내 교육후기 언론소개 질문과 답변 자주 묻는 질문 CONTACT US // 리스트관련 $IBListPageLine = "10"; $IBListPageLine2="10"; $IBListTitleBGColor=""; $IBListTitleTextColor = ""; $IBListBodyBGColor=""; $IBListTitleTextColor = ""; $IBCateGory = ""; // 리스트출력항목 $ListFieldNo = "1"; $ListFieldCate = ""; $ListFieldSubject = "1"; $ListFieldDate = "1"; $ListFieldWriter = "1"; $ListFieldHit = "1"; $ListFieldFile = ""; // 글쓰기설정 $IBWriteContent = "1"; // 이미지크기 $IBListSumImgw = "100"; $IBListSumImgh = "100"; $IBViewImgw = "650"; $IBListColorType="0"; $IBListBodyTextColor=""; $IBListOddBGColor = ""; $IBListOddTextColor = ""; $IBListEvenBGColor = ""; $IBListEvenTextColor = ""; $IBViewAuthorize="0"; $IBWriteAuthorize="0"; $IBReplyAuthorize="0"; $IBReplyAuthorize2="0"; $SkinList="admin_default"; $SkinList2="admin_default"; $ButtonIcon="mall"; $ButtonIcon2="mall"; ?> // 색상결정 if($IBListColorType=="0"){ $BG1=$IBListBodyBGColor; $BG2=$IBListBodyBGColor; $BGT1=$IBListBodyTextColor; $BGT2=$IBListBodyTextColor; }else{ $BG1=$IBListOddBGColor; $BG2=$IBListEvenBGColor; $BGT1=$IBListOddTextColor; $BGT2=$IBListEvenTextColor; } $HNTmp=explode("/",$SCRIPT_FILENAME); $HNTC=sizeof($HNTmp); $NowFolder=$HNTmp[$HNTC-2]; $NowFile=$HNTmp[$HNTC-1]; if(!$mode){$mode="list";} if($NowFolder=="super"){ $SkinS="$SkinList2"; }else{ $SkinS="$SkinList"; } if($event=="delete"){ if($id_value!=""){ $idValue=explode("_",$id_value); for($k=0;$k$i){ $Num[$i] = $Nums; $Uid[$i] = $result_row[uid]; $UserFID[$i] = $result_row[fid]; $Name[$i] = $result_row[name]; $Name[$i] = stripslashes($Name[$i]); // 역 슬래시 제거 $User[$i] = $result_row[userid]; //--- 제목 ------------------------------------------------- $Subject[$i] = convSql($result_row[subject]); $Subject[$i]=str_replace(''',"'",$Subject[$i]); $Subject[$i]=str_replace('"','"',$Subject[$i]); $Subject[$i]=stripslashes(htmlspecialchars(cut_str($Subject[$i],200,".."))); // 제목 자르기 //if($DCBShortSubjLenth!=""){ $Subject=$CutSubject; } // 자른 이름으로 변환 $Subject[$i]=stripslashes($Subject[$i]); // 역 슬래시 제거 //--- 내용 ------------------------------------------------- $Content[$i] = $result_row[content]; $CutContent[$i]=stripslashes(htmlspecialchars(cut_str($Content[$i],"220",$DCBShortEndWord))); //if($DCBShortContLenth!=""){ $Content=$CutContent; } // 자른 이름으로 변환 $Content[$i]=stripslashes($Content[$i]); // 역 슬래시 제거 $Content2[$i] = $result_row[content2]; $CutContent2[$i]=stripslashes(htmlspecialchars(cut_str($Content2[$i],"220",$DCBShortEndWord))); //if($DCBShortContLenth!=""){ $Content=$CutContent; } // 자른 이름으로 변환 $Content2[$i]=stripslashes($Content2[$i]); // 역 슬래시 제거 //--- 글쓴날자 ------------------------------------------------- $signdate = $result_row[signdate]; $signdate1=explode(" ",$signdate); $signdate2=explode("-",$signdate1[0]); $SignDate[$i]=$signdate2[0]."/".$signdate2[1]."/".$signdate2[2]; //--- 최종수정일 ------------------------------------------------- $modydate=$result_row[signdate]; $modydate1=explode(" ",$modydate); $modydate2=explode("-",$modydate1[0]); $ModyDate[$i]=$modydate2[0]."-".$modydate2[1]."-".$modydate2[2]; //--- 조회수 ------------------------------------------------- $Hit[$i] = $result_row[hit]; $Hit2[$i] = $result_row[hit2]; //--- 쓰레드 ------------------------------------------------- $Thread = $result_row[thread]; $ThreadS[$i] = $result_row[thread]; $Html[$i]=$result_row[html_check]; $top_item[$i]=$result_row[top_item]; $File[$i]=$result_row[file]; $passwd[$i]=$result_row[passwd]; // 현재 글 깊이만큼 들여쓰기 설정 $Depth[$i]=""; $depth=strlen($Thread); if($depth==1){ $Depth[$i]=""; } for($j =1; $j < $depth ; $j++) { $Depth[$i].=" "; } // 답글용 아이콘 출력 if($depth>1){ $ReplayIcon[$i]=""; } else{ $ReplayIcon[$i]=""; } $CateS[$i]=$result_row[Category]; $CateS2[$i]=$result_row[Category2]; $MidS[$i]=$result_row[Mid]; $Option1[$i]=$result_row[Option1]; $Option2[$i]=$result_row[Option2]; $Option3[$i]=$result_row[Option3]; $Option4[$i]=$result_row[Option4]; $Option5[$i]=$result_row[Option5]; $Option6[$i]=$result_row[Option6]; $Option7[$i]=$result_row[Option7]; $Option8[$i]=$result_row[Option8]; $Option9[$i]=$result_row[Option9]; $Sdate[$i]=$result_row[Sdate]; $rdate[$i]=$result_row[rdate]; $viewyn[$i]=$result_row[viewyn]; // 검색단어 색변경 if($word){ $SearchTxt="".$DCBFindWordB.$DCBFindWordU.$word.$DCBFindWordU2.$DCBFindWordB2.""; if($field=="subject" || $field=="all"){ $Subject[$i] = str_replace($word,$SearchTxt, $Subject[$i]); }else if($field=="name" || $field=="all"){ $Name[$i]= str_replace($word, $SearchTxt, $Name[$i]); } } // 오늘 올라온 글 체크 및 새글 아이콘 만들기 $my_localdate = date("Y-m-d"); $time=time(); if(($Sdate[$i] - 86400) < $time){ $NewIcon[$i]=true; } else{ $NewIcon[$i]=false; } $secret[$i]=$result_row[secret]; $subdb=$db."_sub"; $subsql="select count(*) from $subdb where Fid='{$Uid[$i]}'"; $subrow=mysql_fetch_row(mysql_query($subsql)); $subCount[$i]=$subrow[0]; $secret[$i]=$result_row[secret]; $Seqs[$i] = $result_row[Seqs]; $rstatus[$i] = $result_row[rstatus]; if($secret[$i]=="1"){ if($_COOKIE[UserIDS] == $User[$i] || $_COOKIE[UserGrade]=="5" || $_COOKIE[UserGrade]=="3"){ $LinkView[$i]="./board_view.php?db=$db&number=$Uid[$i]&mode=view&pn=$pn&RLurl=$RLurl&Com=$Com&MenuS=$MenuS&MenuS2=$MenuS2&Ptmp=$Ptmp&Ptmp2=$Ptmp2&Cate=$Cate&Cate2=$Cate2&field=$field&word=$word"; }else{ $LinkView[$i]="javascript:alert('비밀글입니다.');"; } }else{ $LinkView[$i]="./board_view.php?db=$db&number=$Uid[$i]&mode=view&pn=$pn&RLurl=$RLurl&Com=$Com&MenuS=$MenuS&MenuS2=$MenuS2&Ptmp=$Ptmp&Ptmp2=$Ptmp2&Cate=$Cate&Cate2=$Cate2&field=$field&word=$word"; } //--- 내용(view.php)으로 가는 링크 및 방명록에서 사용되는 링크 설정 ----------------------------------------- $LinkDel[$i]="?db=$db&mode=delete&pn=$pn&number=$Uid[$i]&RLurl=$RLurl&Com=$Com&MenuS=$MenuS&MenuS2=$MenuS2&Ptmp=$Ptmp&Ptmp2=$Ptmp2&Cate=$Cate&Cate2=$Cate2"; $LinkModify[$i]="?db=$db&mode=modify&pn=$pn&number=$Uid[$i]&RLurl=$RLurl&Com=$Com&MenuS=$MenuS&MenuS2=$MenuS2&Ptmp=$Ptmp&Ptmp2=$Ptmp2&Cate=$Cate&Cate2=$Cate2"; $LinkReply[$i]="?db=$db&mode=reply&pn=$pn&number=$Uid[$i]&RLurl=$RLurl&Com=$Com&MenuS=$MenuS&MenuS2=$MenuS2&Ptmp=$Ptmp&Ptmp2=$Ptmp2&Cate=$Cate&Cate2=$Cate2"; }//if($row>$i){ 검색한 결과가 있는지 검사 하는 부분 끝 $Nums--; }//리스트 반복문 끝.. if($HtmlOut==""){ if($NowFolder=="super") { $dbsql = "select * from dbconfigs where tablename = '$db'"; $dbreslt = mysql_query($dbsql); $dbnamerows = mysql_fetch_array($dbreslt); $dbnameString = $dbnamerows[dbname]; ?> //@include $_SERVER['DOCUMENT_ROOT']."/boardnew/system/db/$db/htmlhead.php"; }else{ @include $_SERVER['DOCUMENT_ROOT']."/boardnew/system/db/$db/htmlhead.php"; } } ?> 세라피스 소식 교육안내 교육후기 언론소개 질문과 답변 자주 묻는 질문 세라피스 소식 번호 제목 글쓴이 등록일 if(sizeof($NUid)>0){ for($i=0 ;$i [공지] 0){?>[]}?> }else{?> 0){?>[]}?> }?> 1970-01-01 } }else{ ?> } ?> if(sizeof($Uid)>0){ for($i=0 ;$i 0){?>[]}?> }else{?> 0){?>[]}?> }?> 1970-01-01 } }else{ ?> 등록된 게시물이 없습니다. } ?> $page = subpage($TotalCount,$scale,$pagescale,$pn,$ToPage,$Param,$RLurl); ?> selected="selected"}?>>제목 selected="selected"}?>>제목+내용 selected="selected"}?> >글쓴이 검색 비밀번호를 입력하세요. 확인
selected="selected"}?>>제목 selected="selected"}?>>제목+내용 selected="selected"}?> >글쓴이 검색