|
|
@ -48,7 +48,7 @@ if( is_login() ){ |
|
|
|
'fid' => $fid, |
|
|
|
'fid' => $fid, |
|
|
|
'ORDER' => ["weight" => "DESC"] |
|
|
|
'ORDER' => ["weight" => "DESC"] |
|
|
|
]); |
|
|
|
]); |
|
|
|
return $links; |
|
|
|
return handle_link($links); |
|
|
|
} |
|
|
|
} |
|
|
|
//右键菜单标识 |
|
|
|
//右键菜单标识 |
|
|
|
$onenav['right_menu'] = 'admin_menu();'; |
|
|
|
$onenav['right_menu'] = 'admin_menu();'; |
|
|
@ -100,12 +100,39 @@ else{ |
|
|
|
'property' => 0, |
|
|
|
'property' => 0, |
|
|
|
'ORDER' => ["weight" => "DESC"] |
|
|
|
'ORDER' => ["weight" => "DESC"] |
|
|
|
]); |
|
|
|
]); |
|
|
|
return $links; |
|
|
|
return handle_link($links); |
|
|
|
} |
|
|
|
} |
|
|
|
//右键菜单标识 |
|
|
|
//右键菜单标识 |
|
|
|
$onenav['right_menu'] = 'user_menu();'; |
|
|
|
$onenav['right_menu'] = 'user_menu();'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//处理得到的转换链接数据 |
|
|
|
|
|
|
|
function handle_link($data) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (empty($data)) { |
|
|
|
|
|
|
|
return $data; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
global $db; |
|
|
|
|
|
|
|
$site = $db->get('on_options', 'value', ['key' => "s_site"]); |
|
|
|
|
|
|
|
$site = unserialize($site); |
|
|
|
|
|
|
|
$type = 1; //模式1 原链接 |
|
|
|
|
|
|
|
if (! empty($site['straight']) && $site['straight'] == "open") { |
|
|
|
|
|
|
|
//有且只有开关的时候 才处理 |
|
|
|
|
|
|
|
$type = 2; //模式2 新链接 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$hrefLink = ""; |
|
|
|
|
|
|
|
foreach ($data as &$value) { |
|
|
|
|
|
|
|
switch ($type) { |
|
|
|
|
|
|
|
case "1": |
|
|
|
|
|
|
|
$hrefLink = "/index.php?c=click&id=" . $value['id']; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "2": |
|
|
|
|
|
|
|
$hrefLink = $value['url']; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$value['href_link'] = $hrefLink; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return $data; |
|
|
|
|
|
|
|
} |
|
|
|
//获取版本号 |
|
|
|
//获取版本号 |
|
|
|
function get_version(){ |
|
|
|
function get_version(){ |
|
|
|
if( file_exists('version.txt') ) { |
|
|
|
if( file_exists('version.txt') ) { |
|
|
|