<?php
define('SessionAdmin', 'admin_spa'); //remember to change the config.php of ckfinder


function microtime_float(){
	list($usec, $sec) = explode(" ", microtime());
	//return ((float)$usec + (float)$sec);
	return ((float)$sec);
}


function sectionName($id){
	$sql = mysql_query('SELECT * FROM `section` WHERE `section_id` = '.$id);
	$row = mysql_fetch_assoc($sql);
	return $row['ep_name'];
}
function cdc_sectionName($id){
	$sql = mysql_query('SELECT * FROM `cdc_section` WHERE `section_id` = '.$id);
	$row = mysql_fetch_assoc($sql);
	return $row['ep_name'];
}

function htmlDecode($str){
	$data = htmlspecialchars_decode($str, ENT_QUOTES);
	return $data;
}

//category name added at 2019-10-10
function categoryName($id){
	$sql = mysql_query('SELECT * FROM `nchmcblog_cat` WHERE `cat_id` = '.$id);
	$row = mysql_fetch_assoc($sql);
	return $row['cp_cat_name'];
}
//end category name

?>