-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /var/www/html/inc/class/
File Upload :
Current File : /var/www/html/inc/class/function.etc.php

<?php

	function load_fckeditor($default_name='contents' , $default_width='100%' , $default_height = 400 , $default_skin = 'silver' , $default_set = 'Classic' ) {
		$filepath = $_SERVER['DOCUMENT_ROOT'] . '/fckeditor/fckeditor.php' ;
		if ( !is_file($filepath)) return '' ;
		include $filepath ;
		$EDITOR = new FCKeditor($default_name);          // textarea name
		$EDITOR->BasePath = '/fckeditor/';			// ¼³Ä¡ÇÑ Æú´õ ÁöÁ¤
		$EDITOR->Width      = $default_width;					// width
		$EDITOR->Height     = $default_height;					// height
		$EDITOR->Config['SkinPath'] = $EDITOR->BasePath . 'editor/skins/' . htmlspecialchars($default_skin) . '/' ;
		$EDITOR->ToolbarSet = htmlspecialchars($default_set);
		return $EDITOR ;
	}

	function load_image ( $code , $numid , $width , $height )
	{
		global $exe , $config , $info_file ;
		$table = $config[$code][1] ;
		// ÆÄÀÏ
		$tmp_file_image = $exe->qry_fetch ( " from tbl_{$info_file[table]} where keycode='{$code}' and parent_numid = '{$numid}' and file_type like '%image%' order by fileno asc " , " real_file_name " , "real_file_name" ) ;
		$image = create_image( 'files/' . $table . '/' . $tmp_file_image , $width , $height ) ;
		if ( $image == '' )
			$image = create_image ( $info_file['default_img'] , $width , $height ) ;

		return $image ;
	}

	function not_use_id ( $use_id ) {
		#global $not_use_id ;
		$not_use_id = array ( 'admin' , 'test' ) ;
		$check_id = strtolower($use_id) ;
		foreach ( $not_use_id as $val ) {
			$idx = strpos ( $check_id , $val ) ;
			if ( $idx !== false && $idx < 1 ) return false ;
		}
		return true ;
	}

	function ext_check ( $file_name = '' , $file_ext = '' )
	{
		if ( !empty($file_name))
			$file_ext = substr( $file_name , strrpos( $file_name , '.' )+1) ;

		$file_ext = strtoupper($file_ext) ;
		switch ( $file_ext )
		{
			case 'WMV' :
			case 'ASF' :
			case 'AVI' :
			case 'MPEG' :
			case 'ASX' :
			case 'SWF' :
			case 'MP3' :
			case 'MID' :
			case 'MOV' :
			case 'RM' :
			case 'MPG' :
			case 'DAT' :
				return 'movie' ; break ;
		}
		return '' ;
	}

	function create_image ( $url , $width = 0 , $height = 0 , $option = '' )
	{
		if ( file_info ( $url ) !== false )
		{
			$file_s_size = file_s_down ( $url , $width , $height ) ;
			$return = '<img src="/' . $url . '" width="' . $file_s_size['width'] . '" height="' . $file_s_size['height'] . '" ' . $option . '>' ;
		}
		else $return = '' ;
		return $return ;
	}

	function create_image_imgcdn( $url , $width = 0 , $height = 0 , $option = '' )
	{
		$return = '<img src="/' . $url . '" width="' . $width . '" height="' . $height . '" ' . $option . '>' ;
		return $return ;
	}

	function create_session ( $array )
	{
		if ( is_array($array))
		{
			foreach ( $array as $key=>$val ) {
				if ( empty($key)) continue ;
				session_register($key);
			}
		} else return ;
	}

	function if_empty ( $var , $true , $false )
	{
		if ( empty($var) ) return $true ;
		else return $false ;
	}

	function spcSITENAMEFORADMIN($img_dir, $site_name='') {
		if ($site_name == '') $site_name = $_SERVER[SERVER_NAME];
		$tmp_result = '';
		for ($i=0; $i < strlen($site_name); $i++) {
			$tmp = strtolower(substr($site_name,$i,1));
			if ($tmp == '.') $tmp_result.= '<img src="' . $img_dir . '/dot.gif" style="margin-right:1px; margin-left:1px;">';
			else $tmp_result.= '<img src="' . $img_dir . '/' . $tmp . '.gif">';
		}
		return $tmp_result;
	}

	FUNCTION RTMsg($array , $string , $skin_file ) {
		global $skin ;
		$return_value = array() ;
		$file = $skin->skin ( array (
											'hint'			=> 'HELP'
										) , $skin_file);
		foreach ( $array as $key => $val )
		{
			if ( empty($val)) continue ;
			$return_value[$key] = str_replace ( 'ÁÖÀÇ»çÇ×À» ¿©±â¿¡ Àû¾îÁÖ¼¼¿ä' , $val ,  $file['hint'] ) ;
		}
		return $return_value ;
	}

?>

Copyright © 2017 || Recoded By Mr.Bumblebee