if ( ! function_exists('GetSysEnum'))
{
function GetSysEnum($evalue, $egroup)
{
global $dsql;
$egroup = isset($egroup) ? $egroup : 'nativeplace';
if($evalue % 500 == 0)
{
$rowtop = $dsql->GetOne("select ename from `dede_sys_enum` where egroup='".$egroup."' and evalue='".$evalue."'");
return $rowtop['ename'];
}
else
{
(preg_match("#.#", $evalue)) ? $rowre = $dsql->GetOne("select ename from `dede_sys_enum` where egroup='".$egroup."' and evalue='".( floor($evalue-($evalue%500))+1 )."'") : $rowre['ename'] = '';
$rowtop = $dsql->GetOne("select ename from `dede_sys_enum` where egroup='".$egroup."' and evalue='".( floor($evalue-($evalue%500)) )."'");
$rowson = $dsql->GetOne("select ename from `dede_sys_enum` where egroup='".$egroup."' and evalue='".$evalue."'");
if(is_array($rowson))
{
return $rowtop['ename'].$rowre['ename'].$rowson['ename'];
}
}
}
}
|