-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /var/www/html/zbk_admin.220809/php/board/
File Upload :
Current File : /var/www/html/zbk_admin.220809/php/board/act.update.php

<?php

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

	if ( empty($numid)) 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 ( empty($_POST['pass']) || $_POST['pass'] != $info['pass'] )
	{
		if (!empty($total['loginid']) && !empty($total['loginno']) && $total['loginlevel'] == $info['real_level'] && $total['loginno'] == $info['real_no'] && $total['loginid'] == $info['real_id'] )
		{
			// ÀÚ±â±ÛÀÌ¸é ¼öÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
		}
		else
		{
		//	script_re( $total['cmnnb'] . '&mode=pass&next_mode=' . $total['mode'] , ' ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù. ' ) ;
		}
	}

	if ( $total['options']['self'] == 'on' )
	{
	//	if ( $info['real_id'] != $total['loginid'] ) script_bk( ' ±ÇÇÑÀÌ ¾ø½À´Ï´Ù. ' ) ;
	}

######################################################
// base construct
######################################################

	$action = array (
		'last_edit_date'	=> $total['now'] ,
		'ip'				=> $total['ip'] ,
		'text_type'			=> $_POST['text_type'] ,
		'title'				=> str_convert($_POST['title']) ,
		'title_color'		=> $_POST['title_color'] ,
		'title_link'		=> $_POST['title_link'] ,
		'name'				=> str_convert($_POST['name']) ,
		'pass'				=> $_POST['pass'] ,
		'email'				=> $_POST['email'] ,
		'contents'			=> str_convert($_POST['contents']) ,
	) ;

########################################################
// use sub title
########################################################

	if ( $total['options']['sub_title'] == 'on' )
		$action['title_s'] = str_convert($_POST['title_s']) ;

########################################################
// use title(special) image
########################################################

	if ( $total['options']['title_image'] == 'on' )
	{
		if ( !empty($_FILES['main_image']['name'] )) {
			file_delete ( 'files/' . $total['table'] . ${$total['options']['title_info']}['directory'] . '/' . $info['main_image'] ) ;
			$class_resizeimage = new resizeimage ;
			$class_resizeimage->upload_dir = 'files/' . $total['table'] . ${$total['options']['title_info']}['directory'] ;
			$class_resizeimage->width = ${$total['options']['title_info']}['width'] ;
			$class_resizeimage->height = ${$total['options']['title_info']}['height'] ;
			$class_resizeimage->option_fixed = 'N' ;
			$class_resizeimage->file_format = ${$total['options']['title_info']}['ext'] ;
			$class_resizeimage->resize( $_FILES['main_image'] ) ;
			$action['main_image'] = $class_resizeimage->result_file_name ;
		} else if ( $_POST['del_main_image'] == 'Y' ) {
			file_delete ( 'files/' . $total['table'] . ${$total['options']['title_info']}['directory'] . '/' . $info['main_image'] ) ;
			$action['main_image'] = '' ;
		}
		/*
		if ( $_POST['del_main_image'] == 'Y' || !empty($_FILES['main_image']['name']))
		{
			if ( file_info ( 'files/' . $total['table'] . '/' . $info['main_image'] ) !== false )
			{
				$action['main_image'] = '' ;
				file_delete( 'files/' . $total['table'] . '/' . $info['main_image'] ) ;
			}
			$action['main_image'] = file_upload( $_FILES['main_image']['tmp_name'] , $_FILES['main_image']['name'] , 'files/' . $total['table'] ) ;
		}
		*/
	}

######################################################
// use record (notice or common)
######################################################

	if ( $total['options']['record'] == 'on' && $total['options']['record_level'] <= $total['loginlevel'] )
		$action['record_type'] = ( $_POST['record_type'] == 'Y' )?'Y':'N' ;

######################################################
// use secret
######################################################

	if ( $total['options']['secret'] == 'on' )
		$action['secret_type'] = ( $_POST['secret_type'] == 'Y' )?'Y':'N' ;

######################################################
// use select
######################################################

	if ( $total['options']['select'] == 'on' )
		$action['select_main']= implode( ',' , $_POST['select_main'] ) ;

######################################################
// use category
######################################################

	if ( $total['options']['category'] == 'on' )
	{
	#	$action['category_code']	= $_POST['category_code'] ;
	#	$action['category_numid'] = $_POST['category_numid'] ;
	}

######################################################
// use head
######################################################

	if ( $total['options']['head'] == 'on' )
	{
		$action['head_code'] = $_POST['head_code'] ;
		$action['head_contents'] = $_POST['head_numid'] ;
	}

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

	if ( $total['options']['movie'] == 'on' )
	{
		if ( $_POST['del_mov_image'] == 'Y' || !empty($_FILES['mov_image']['name']))
		{
			if ( file_info ( 'files/' . $info_file['mov_dir'] . '/' . $info['mov_image'] ) !== false )
			{
				$action['mov_image'] = '' ;
				file_delete( 'files/' . $info_file['mov_dir'] . '/' . $info['mov_image'] ) ;
			}
			$action['mov_image'] = file_upload( $_FILES['mov_image']['tmp_name'] , $_FILES['mov_image']['name'] , 'files/' . $info_file['mov_dir'] ) ;
		}
		if ( $_POST['del_mov_video'] == 'Y' || !empty($_FILES['mov_video']['name']))
		{
			if ( file_info ( 'files/' . $info_file['mov_dir'] . '/' . $info['mov_video'] ) !== false )
			{
				$action['mov_video'] = '' ;
				file_delete( 'files/' . $info_file['mov_dir'] . '/' . $info['mov_video'] ) ;
			}
			$action['mov_video'] = file_upload( $_FILES['mov_video']['tmp_name'] , $_FILES['mov_video']['name'] , 'files/' . $info_file['mov_dir'] ) ;
		}
		$action['mov_video_link'] = $_POST['mov_video_link'] ;
	}

######################################################
// action
######################################################

	$exe->qry_update ( $action , " tbl_{$total[table]} " , " numid='{$numid}' " ) ;

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

	if ( $total['options']['file'] == 'on' ) {
		$exe->qry_update( " parent_numid = '{$numid}' , temp_code = null " , "tbl_{$info_file[table]}" , " keycode='{$total[code]}' and temp_code='{$_POST[temp_code]}' " ) ;
		$file_count = mysql_affected_rows() ;
		$f_rs = $exe->qry_fetch ( " from tbl_{$info_file[table]} where parent_numid = '{$numid}' and keycode='{$total[code]}' and up_type = 'THUMB' order by fileno asc limit 1 " , " real_file_name ") ;
		$thum_filename = "" ;
		if ( !empty($f_rs['real_file_name'])) $thum_filename = "'{$info_thumb[head]}" . $f_rs['real_file_name'] . "'" ;
		else $thum_filename = "null" ;
		$exe->qry_update( " attachfile_count = attachfile_count + {$file_count} , prev_image = {$thum_filename}" , ' tbl_' . $config[$code][1] , ' keycode=\'' . $code . '\' and numid=\'' . $numid . '\' ' ) ;
	}

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

	script_re($total['cmnall'] . '&mode=view&numid=' . $numid ) ;

?>

Copyright © 2017 || Recoded By Mr.Bumblebee