-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /var/www/html/html/php/board/
File Upload :
Current File : /var/www/html/html/php/board/skn.view.php

<?php

########################################################
// approve
########################################################

	if ( empty($numid)) script_re($total['cmnall'] , ' Á¢±ÙÇÒ ¼ö ¾ø½À´Ï´Ù. ' ) ;

	if ( $config[$total['code']][4]['viewlevel'] > $total['loginlevel'] )
		script_re($total['cmnall'] , ' ±ÇÇÑÀÌ ¾ø½À´Ï´Ù. ' ) ;

	$info = $exe->qry_fetch ( " from tbl_{$total[table]} where keycode='{$total[code]}' and numid='{$numid}' " , " * " ) ;
	if ( empty($info['numid'])) script_re( $total['cmnall'] , ' »èÁ¦µÇ¾ú°Å³ª ¾ø´Â µ¥ÀÌÅÍÀÔ´Ï´Ù. ' ) ;

	if ( $config[$total['code']][4]['self'] == 'on' )
	{
		if ( $info['real_id'] != $total['loginid'] && $info['self_numid'] != $total['loginno'] )
		{
			script_bk( ' ±ÇÇÑÀÌ ¾ø½À´Ï´Ù. ' ) ;
		}
	}

########################################################
// approve :: secret
########################################################

	if ( $config[$total['code']][4]['secret'] == 'on' && $info['secret_type'] == 'Y' )
	{
		if ( !empty($total['loginid']) && !empty($total['loginno']) && $total['loginlevel'] == $info['real_level'] && $total['loginno'] == $info['real_no'] && $total['loginid'] == $info['real_id'] )
		{
			// ÀÚ±â±ÛÀÌ¸é ºñ¹Ð¹øÈ£°¡ ÇÊ¿ä¾ø½À´Ï´Ù.
		}
		else
		{
			// ÇöÀç ±ÛÀÌ ´ä±ÛÀÏ °æ¿ì
			// ¿øº»±ÛÀÇ ºñ¹Ð¹øÈ£³ª ÇöÀç ±ÛÀÇ ºñ¹Ð¹øÈ£ ¸ðµÎ »ç¿ë°¡´É
			if ( empty($_POST['pass']))
				script_re( $total['cmnnb'] . '&mode=pass&next_mode=view' ) ;
			else if ( $info['msg_level'] > 0 )
			{
				// ¿øº»±ÛÀÇ ºñ¹Ð¹øÈ£ °¡Á®¿À±â..
				$tmp_pass = $exe->qry_fetch (	" from tbl_{$total[table]} where keycode='{$total[code]}' " .
												" and grp_id = '{$info[grp_id]}' and seq_id < '{$info[seq_id]}' and msg_level < '{$info[msg_level]}' order by seq_id desc limit 1 " , " numid , pass " ) ;
				if ( $tmp_pass['pass'] != $_POST['pass'] && $info['pass'] != $_POST['pass'] )
					script_re( $total['cmnnb'] . '&mode=pass&next_mode=view' , ' ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù. \n ¡Ø ´ä±ÛÀÏ °æ¿ì ¿øº»±ÛÀÇ ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇϼŵµ Á¢±ÙÇÒ ¼ö ÀÖ½À´Ï´Ù. ' ) ;
			}
			// ÇöÀç ±ÛÀÌ ÀϹݱÛÀÏ °æ¿ì
			else
			{
				if ( $info['pass'] != $_POST['pass'] )
					script_re( $total['cmnnb'] . '&mode=pass&next_mode=view' , ' ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.' ) ;
			}
		}
	}

########################################################
// readcheck
########################################################

	$chk_view = $exe->qry_fetch ( " FROM tbl_{$total[table]}_ip WHERE keycode = '{$TOTAL[code]}' AND s_type = 'read' AND ip = '{$total[ip]}' AND parent_numid = '{$numid}' " , " COUNT(*) as cntnum " , "cntnum" ) ;
	if ( empty($chk_view)) {
		$exe->qry_update( " read_count = read_count + 1 " , "tbl_{$total[table]}" , " numid='{$numid}' " ) ;
		$info['read_count']+=1;
		$exe->qry_insert ( array (
							'keycode'		=> $total['code'] ,
							's_type'		=> 'read' ,
							'write_date'	=> $total['now'] ,
							'ip'			=> $total['ip'] ,
							'parent_numid'	=> $numid
						  ) , "tbl_{$total[table]}_ip" ) ;
	}

########################################################
// skin file
########################################################

	$skins = $skin->skin (	array (
							'frm'		=> 'FORM' ,
							'comment'	=> 'COMMENT' ,
							'o_frm'		=> 'MOVE RECORD'
						 ) , $skinfile ) ;

########################################################
// button
########################################################

	$total['btn_list'] = '<a href="' . $total['cmnall'] . '">' . $button['btn_list'] . '</a>' ;
	if ( $config[$total['code']][4]['level'] >= 90 )
		$total['btn_write'] = '' ;
	else if (( $config[$total['code']][4]['level'] <= $total['loginlevel'] && $config[$total['code']][4]['maxlevel'] >= $total['loginlevel']) || $config[$total['code']][4]['replylevel'] <= $total['loginlevel'])
	{
		if ( $config[$total['code']][4]['level'] <= $total['loginlevel'] && $config[$total['code']][4]['maxlevel'] >= $total['loginlevel'])
			$total['btn_write'] = '<a href="' . $total['cmnall'] . '&mode=write">' . $button['btn_write'] . '</a>' ;
		// ÀÚ±â±ÛÀÌ¸é ±×³É ¼öÁ¤/»èÁ¦ °¡´ÉÇÕ´Ï´Ù.
		if ( !empty($total['loginid']) && !emptY($total['loginno']) && $info['real_id'] == $total['loginid'] && $info['real_no'] == $total['loginno'] && $info['real_level'] == $total['loginlevel'] )
		{
			$total['btn_delete'] = '<a href="javascript: confirmmsg(\'»èÁ¦ÇÕ´Ï´Ù.\' , \'' . $total['cmnnb'] . '&mode=delete\'); ">' . $button['btn_delete'] . '</a>' ;
			$total['btn_modify'] = '<a href="' . $total['cmnnb'] . '&mode=modify">' . $button['btn_modify'] . '</a>' ;
		}
		else
		{
			$total['btn_delete'] = '<a href="' . $total['cmnnb'] . '&mode=pass&next_mode=delete">' . $button['btn_delete'] . '</a>' ;
			$total['btn_modify'] = '<a href="' . $total['cmnnb'] . '&mode=pass&next_mode=modify">' . $button['btn_modify'] . '</a>' ;
		}
	}
	else
	{
		$total['btn_write'] = '<a href="javascript:alert(\'·Î±×ÀÎÀÌ ÇÊ¿äÇÕ´Ï´Ù.\');">' . $button['btn_write'] . '</a>' ;
	}
	if ( $config[$total['code']][4]['reply'] == 'on' && $config[$total['code']][4]['replylevel'] <= $total['loginlevel'] && $info['record_type'] != 'Y' )
	{
		// ÀÚ±â±ÛÀÌ¸é ±×³É ¼öÁ¤/»èÁ¦ °¡´ÉÇÕ´Ï´Ù.
		if ( !empty($total['loginid']) && !emptY($total['loginno']) && $info['real_id'] == $total['loginid'] && $info['real_no'] == $total['loginno'] && $info['real_level'] == $total['loginlevel'] )
		{
			$total['btn_delete'] = '<a href="javascript: confirmmsg(\'»èÁ¦ÇÕ´Ï´Ù.\' , \'' . $total['cmnnb'] . '&mode=delete\'); ">' . $button['btn_delete'] . '</a>' ;
			$total['btn_modify'] = '<a href="' . $total['cmnnb'] . '&mode=modify">' . $button['btn_modify'] . '</a>' ;
		}
		else
		{
			$total['btn_delete'] = '<a href="' . $total['cmnnb'] . '&mode=pass&next_mode=delete">' . $button['btn_delete'] . '</a>' ;
			$total['btn_modify'] = '<a href="' . $total['cmnnb'] . '&mode=pass&next_mode=modify">' . $button['btn_modify'] . '</a>' ;
		}
		$total['btn_reply'] = '<a href="' . $total['cmnnb'] . '&mode=reply">' . $button['btn_reply'] . '</a>' ;
	}

	#$total['btn_vot'] = '<a href="' . $total['cmnnb'] . '&mode=vot">' . $button['btn_vot'] . '</a>' ;
	#$total['btn_print'] = '<a href="#" onclick="poppage(\'' . $total['cmnnb'] . '&mode=print\',\'PRINTPAGE\',\'width=500,height=500\');">' . $button['btn_print'] . '</a>' ;

########################################################
// get data
########################################################

	$info['title'] = html_entity_decode($info['title']) ;
	$info['title'] = str_cut($info['title'] . '' , 90 ) ;
	if ( $info['real_level'] != 99 ) {
		//$info['name'] = str_cut($info['name'] , 15 ) ;
	}
	// Á¦¸ñ»ö»ó
	$info['title'] = '<span style="color:' . $info['title_color'] . '">' . $info['title'] . '</span>' ;

	$info['name'] = html_entity_decode($info['name']) ;
	$info['contents'] = html_entity_decode($info['contents']) ;
	//$info['contents'] = str_ireplace('<img ' , '<img onclick="openImage(this.src);" ' , $info['contents'] ) ;
	$info['contents'] = str_ireplace('openImage' , 'nopenImage' , $info['contents'] ) ;
	$info['read_count'] = number_format( $info['read_count']) ;
	$info['write_date'] = ucf_date_format($info['write_date'] , 'Y-m-d' ) ;
	/*
	// prev data
	$prev_info = $exe->qry_fetch ( " from tbl_{$total[table]} where keycode='{$total[code]}' {$search_query[total]} and ( grp_id > {$info[grp_id]} or ( grp_id = {$info[grp_id]} and seq_id < {$info[seq_id]} )) and record_type != 'Y'  order by grp_id asc , seq_id desc " , " numid , title , msg_level ") ;
	if ( !empty($prev_info['numid'])) {
		$prev_info['padding_left'] = '' ;
		for ( $i = 0 ; $i < $prev_info['msg_level'] ; $i++) {
			$prev_info['padding_left'].= '<span style="width:16px;"></span>' ;
		}
		if ( !empty($prev_info['padding_left'])) $prev_info['padding_left'].= $button['btn_re'] ;
		$info['prev_record'] = str_foreach ( array ( 'move_type' => $button['btn_move_up'] , 'title' => $prev_info['padding_left'] . ' <a href="' . $total['cmnall'] . '&mode=view&numid=' . $prev_info['numid'] . '">' . str_cut(str_no_tag($prev_info['title']),50) . '</a>' ) , 'RS' , $skins['o_frm'] ) ;
	}
	// next data
	$next_info = $exe->qry_fetch ( " from tbl_{$total[table]} where keycode='{$total[code]}' {$search_query[total]} and ( grp_id < {$info[grp_id]} or ( grp_id = {$info[grp_id]} and seq_id > {$info[seq_id]} )) and record_type != 'Y'  order by grp_id desc , seq_id asc " , " numid , title , msg_level ") ;
	if ( !empty($next_info['numid'])) {
		$next_info['padding_left'] = '' ;
		for ( $i = 0 ; $i < $next_info['msg_level'] ; $i++) {
			$next_info['padding_left'].= '<span style="width:16px;"></span>' ;
		}
		if ( !empty($next_info['padding_left'])) $next_info['padding_left'].= $button['btn_re'] ;
		$info['next_record'] = str_foreach ( array ( 'move_type' => $button['btn_move_down'] , 'title' => $next_info['padding_left'] . ' <a href="' . $total['cmnall'] . '&mode=view&numid=' . $next_info['numid'] . '">' . str_cut(str_no_tag($next_info['title']),50) . '</a>' ) , 'RS' , $skins['o_frm'] ) ;
	}
	*/

########################################################
// comment
########################################################

	if ( $config[$total['code']][4]['comment'] == 'on' )
	{
		$info['comment'] = str_foreach ( array ( 'numid' => $numid ) , 'INFO' , $skins['comment'] ) ;
	}

########################################################
// use file
########################################################

	if ( $config[$total['code']][4]['file'] == 'on' )
	{
		// ´Ù¿î·Îµå ±ÇÇÑ
		if ( $config[$total['code']][4]['down_level'] <= $total['loginlevel'] )
		{
			$info['file_list'] = '' ;
			$execute = $exe->qry_one( " from tbl_{$info_file[table]} where keycode='{$total[code]}' and parent_numid = '{$numid}' and up_type = 'ATTACH' order by write_date asc " , " fileno , real_file_name, orig_file_name, file_ext , file_type " ) ;
			while ( $rs = $exe->fetch ( $execute))
			{
				$info['file_list'].= '<a href="/inc/file/down.php?num=' . $rs['fileno'] . '">' . $rs['orig_file_name'] . '</a><br>' . chr(13) ;
			}
			if ( !empty($info['file_list']))
				$info['file_list'] = '<div align="right" style="padding-top:3px;padding-bottom:3px;">' . $info['file_list'] . '</div>' ;
		}
	}

########################################################
// use movie
########################################################

	if ( $config[$code][4]['movie'] == 'on' )
	{
		if ( file_info( 'files/' . $info_file['mov_dir'] . '/' . $info['mov_image'] ) !== false && file_info( 'files/' . $info_file['mov_dir'] . '/' . $info['mov_video'] ) !== false )
		{
			$info['contents'] = '
				<div align="center">
				<table>
				  <tr>
				    <td><img src="/files/' . $info_file['mov_dir'] . '/' . $info['mov_image'] . '" id="mov_image"  style="cursor:hand" onClick="javascript:playercontrol(\'play\' , \'mov_image\' , \'mov_video\'); "><script language="javascript">_get_tag_script_embed (\'/files/' . $info_file['mov_dir'] . '/' . $info['mov_video'] . '\' , \'mov_video\' , \' style="display:none;" \' );</script></td>
				  </tr>
				</table>
				</div>
			' . $info['contents'] ;
		}
		else if ( file_info( 'files/' . $info_file['mov_dir'] . '/' . $info['mov_video'] ) !== false )
		{
			$info['contents'] = '
				<div align="center">
				<table>
				  <tr>
				    <td><script language="javascript">_get_tag_script_embed (\'/files/' . $info_file['mov_dir'] . '/' . $info['mov_video'] . '\' , \'mov_video\' , \' style="display:;" \' );</script></td>
				  </tr>
				</table>
				</div>
			' . $info['contents'] ;
		}
		else if ( file_info( 'files/' . $info_file['mov_dir'] . '/' . $info['mov_image'] ) !== false )
		{
			$info['contents'] = '
				<div align="center">
				<table>
				  <tr>
				    <td><img src="/files/' . $info_file['mov_dir'] . '/' . $info['mov_image'] . '" onclick=" alert(\'µ¿¿µ»óÀÌ ¾ø½À´Ï´Ù.\'); "></td>
				  </tr>
				</table>
				</div>
			' . $info['contents'] ;
		}
	}

########################################################
// end
########################################################

	$result = str_foreach ( $info , 'INFO' , $skins['frm'] ) ;


?>

Copyright © 2017 || Recoded By Mr.Bumblebee