if (!function_exists('diy_get_arcurl'))
{
/**
* 获取前台文档的URL
* @param integer $aid 文档ID
* @param integer $typeid 栏目ID
* @return [type] [description]
*/
function diy_get_arcurl($aid = 0, $typeid = 0){
$url = '';
if (!empty($aid)) {
static $arctypeList = null;
if (null === $arctypeList) {
$arctypeList = hinkDb::name('arctype')->order('id asc')->getAllWithIndex('id');
}
$row = !empty($arctypeList[$typeid]) ? $arctypeList[$typeid] : [];
if (!empty($row)) {
$row['aid'] = $aid;
$url = arcurl('home/View/index', $row);
}
}
return $url;
}
}